File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed
src/main/java/com/fishercoder/solutions Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change 3
3
import java .util .ArrayList ;
4
4
import java .util .List ;
5
5
6
- /**
7
- * You are playing the following Flip Game with your friend:
8
- * Given a string that contains only these two characters: + and -,
9
- * you and your friend take turns to flip two consecutive "++" into "--".
10
- * The game ends when a person can no longer make a move and therefore the other person will be the winner.
11
-
12
- Write a function to determine if the starting player can guarantee a win.
13
-
14
- For example, given s = "++++", return true. The starting player can guarantee a win by flipping the middle "++" to become "+--+".
15
-
16
- Follow up:
17
- Derive your algorithm's runtime complexity.
18
- */
19
6
public class _294 {
20
7
21
8
public static class Solution1 {
You can’t perform that action at this time.
0 commit comments