โ† Amazon questions
CodingReported in a candidate post, Jul 2025

Print run length encoding of a string

Filed under Amazon

Write a function to generate the run-length encoding for a given input string by replacing consecutive repeating characters with the character followed by its count.

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.