Leetcode 3307. Find the K-th Character in String Game II
Starting from "a", each operation appends either an identical copy or a +1-mod-26 shifted copy, causing the string to double repeatedly so its length can exceed 1e14; the challenge is to return the k-th character without constructing the string. Compute lengths and reverse-simulate the operations to map the k index back to the original 'a' while accumulating character shifts modulo 26.
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.