Solved LeetCode program · 963 of 1,000
#1332 · Remove Palindromic Subsequences
Original English source
The word is "baabb". The left is 0. The right is 4. The mirror is 1.
Repeat while left is less than right.
The first is character left of word. The second is character right of word. Add 1 to left. Decrease right by 1. If first is not second, set mirror to 0.
If mirror is 1, Show 1, otherwise Show 2.
Expected stdout
2