Skip to content

Commit 7208b7a

Browse files
committed
Runtime: 73 ms (Top 80.85%) | Memory: 42.2 MB (Top 59.57%)
1 parent ae3f9bd commit 7208b7a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1+
// Runtime: 73 ms (Top 80.85%) | Memory: 42.2 MB (Top 59.57%)
12
var minimumMoves = function(s) {
23
let move = 0;
34
let i = 0;
45
while(i<s.length){
56
let char = s[i];
6-
// incrementing the index if we already have 'O'
7+
// incrementing the index if we already have 'O'
78
if(char== 'O'){
89
i++;
910
}
10-
// incrementing the move and index by 3 (Per move = 3 characters)
11+
// incrementing the move and index by 3 (Per move = 3 characters)
1112
if(char== 'X'){
1213
i=i+3;
1314
move++;
1415
}
1516
}
1617
return move;
17-
};
18+
};

0 commit comments

Comments
 (0)