Starting with an initial binary string (or '0'), repeatedly replace '0' with '01' and '1' with '10' for k iterations. Return the character at the m-th index (0-indexed) after k iterations.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.