
Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Since the length of s is even, the total number of possible sequences is at most 10 * 10 * s.length.
You can generate all possible sequences and take their minimum.
Keep track of already generated sequences so they are not processed again.