The TransCompilator

Solved LeetCode program · 963 of 1,000

#1332 · Remove Palindromic Subsequences

Easy String chunk-20.md

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.

Open in Playground Browse all 1,000 problems

Expected stdout

2