Leetcode 880. Decoded String at Index
Given an encoded string where letters append to a tape and digits 2–9 repeat the entire current tape, return the k-th character of the fully decoded string; because the decoded string can be astronomically large, compute cumulative decoded lengths and traverse the encoding backwards using modulo reductions to map k to the original letter without building the full string.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Your account is free and you can post anonymously if you choose.