โ† Amazon questions

Find Kth character in string after N iterations

Filed under Amazon

A binary string is initially '0'. At each iteration, every '0' is replaced by '01' and every '1' is replaced by '10'. Find the k-th character (0-indexed) in the string after n 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.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.