← Amazon questions

Swap two nodes in a linked list

Filed under Amazon · Also reported at Adobe

Given a linked list and two keys, swap the two nodes corresponding to the given keys. If either key is not present, do nothing.

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.