← Amazon questions

Run length encoding, least greater element, and substring reversal

Filed under Amazon

Solve three separate sub-problems: 1) Compute run-length encoding for a linked list; 2) Replace every element in a linked list with the least greater element on its right; 3) Reverse every consecutive…

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.