Sponsored
Use these hints if you're stuck. Try solving on your own first.
Find the smallest substring you need to consider at a time.
Try delaying a move as long as possible.
Solve with full IDE support and test cases