← Microsoft questions

Reverse group of elements in a linked list

Filed under Microsoft

Given the head of a linked list and an integer k, reverse the nodes of the list k at a time, and return its modified list. If the number of nodes is not a multiple of k then left-out nodes, in the…

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

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