← Questions

Reverse nodes in k-group

0
MicrosoftCodingLast asked Oct 2025

Reverse a linked list in groups of k nodes, leaving a final group shorter than k as it is. Do it in place with O(1) extra space.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding