Leetcode 3614. Process String with Special Operations II
Given s of letters and special ops where a letter appends, '*' deletes the last char, '#' duplicates the entire current string, and '%' reverses it, compute the k-th character of the final result (or '.' if out of bounds). The core challenge is handling potentially exponential growth from '#' by tracking lengths and mapping k backwards through duplications/reversals/deletions instead of constructing the full string.
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.