Flip game winner

Write codeMedium30 min

Your task

Two players alternate turns on a string of '+' and '-' characters. On a move a player flips two consecutive '++' into '--'. A player who cannot move loses. Given the starting string s, return true if the player to move first can guarantee a win with optimal play. 1 <= len(s) <= 18.

Examples

can_win(s: str) -> bool
Example 1
Inputcan_win("++++")
OutputTrue