← Amazon questions
CodingReported in a candidate post, Aug 2022

Odd-even linked list variation in O(1) space

Filed under Amazon

Given a singly linked list, group all nodes with odd indices followed by nodes with even indices. Maintain O(1) space complexity and O(n) time complexity.

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.