Skip to content

Commit 0724840

Browse files
committed
Time: 1 ms (81.26%), Space: 41.2 MB (96.28%) - LeetHub
1 parent a4b26d4 commit 0724840

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class Solution {
2+
public int minimumMoves(String s) {
3+
int count = 0;
4+
for (int i = 0; i < s.length(); i++) {
5+
if (s.charAt(i) == 'X') {
6+
count++;
7+
i+=2;
8+
}
9+
}
10+
return count;
11+
}
12+
}

0 commit comments

Comments
 (0)