1. You will be given a string made of only 2 characters + and -
2. The rules of game are:
a) You can only flip two consecutive + to -
b) Game ends when you can't flip anymore
c) Return empty string when you cannot flip anymore
3. Input and output is handled for you
4. It is a functional problem ,please do not modify main()
Input Format
Input is handled for you.
Output Format
Return list of all possible states output is handled
Constraints
String consists of only + and -
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
---+++++
Output
[-----+++, ---+--++, ---++--+, ---+++--]