Given a string consisting of only + and -, two players take turns flipping two consecutive + characters to --. The player who cannot make a move loses. Determine if the starting player can guarantee a win assuming both players play optimally.
Example 1
Input: ++--+++
Output: True
Explanation: The starting player can flip the first two + to --, leaving --+--++. The second player cannot win.
Example 2
Input: ++++-
Output: True
Explanation: The starting player can flip the first two + to --, leaving --++-. The second player cannot win.
Example 3
Input: --++--
Output: False
Explanation: No move can be made by the starting player.
Constraints
Case 1
Input: '++-+++'
Expected: True
Case 2
Input: '++--++'
Expected: False
Case 3
Input: '++++++'
Expected: True
Case 4
Input: '--+--+'
Expected: False