← Walmart questions

Reverse linked list in groups of k

Filed under Walmart · Also reported at Fiorano, Koo, Zomato

Given the head of a linked list, reverse the nodes of the list k at a time, and return the modified list. k is a positive integer and is less than or equal to the length of the list. If the number of…

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 Walmart questions

Collected from public candidate posts and coding forums. Updated Nov 2026.