Flip Game II
Input: s = "++++"
Output: true
Explanation: The starting player can guarantee a win by flipping the middle "++" to become "+--+".Analysis
boolean canWinHelper(String s, HashMap<String, Boolean> map) "++++" (T)
/ | \
"--++" (T) "+--+" (F) "++--" (T)
/ \
"----" (F) "----" (F)Solution
Reference
Last updated