← Amazon questions
CodingEasy

Reverse string in k-length blocks

Filed under Amazon

Given a string and an integer k, reverse the characters of the string in blocks of length 2k. If there are fewer than k characters left, reverse all of them. If there are less than 2k but greater than…

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.