The problem, in one line. Reverse a list k nodes at a time and leave a final group shorter than k exactly as it is. LeetCode 25.
The tell. Reverse, repeated in blocks, with a leftover that must stay put. It is the first card of this pattern inside a loop, guarded by a check that k nodes really are ahead.
Included with a plan
This solution is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.