Leetcode 3563. Lexicographically Smallest String After Adjacent Removals
Given a lowercase string, you may repeatedly delete any adjacent pair of letters that are consecutive in the cyclic alphabet (including 'a'↔'z'), with the string compacting after each deletion. Find the lexicographically smallest string obtainable by choosing deletions optimally — a combinatorial/DP-style optimization since removal order affects future adjacencies.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.