โ† Tolexo questions

Reverse the first k and last k nodes of a linked list, k = n/3

Filed under Tolexo

The question

Given a linked list of size n and k = n/3, print the first k and last k elements each in reverse order (1-2-3-4-5-6 becomes 2-1-3-4-6-5).

No write-up yet. Related questions below have one.

Related Tolexo questions

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