Tagged articles

k-group reversal

2 articles · Page 1 of 1
Nullbody Notes
Nullbody Notes
Nov 16, 2023 · Interview Experience

Reverse a Linked List in K-Node Groups – Go Solution for Interviews

This article explains how to reverse a singly‑linked list in groups of K nodes by locating each segment's head and tail, reversing the segment, and recursively processing the remainder, with a complete Go implementation and step‑by‑step reasoning.

algorithminterviewk-group reversal
0 likes · 4 min read
Reverse a Linked List in K-Node Groups – Go Solution for Interviews
Java Captain
Java Captain
Aug 13, 2019 · Fundamentals

Reversing a Singly Linked List in K‑Node Groups Starting from the Tail

The article explains how to solve a variant of the linked‑list reversal problem where every K nodes are reversed as a group starting from the tail, using recursion and double reversal techniques, and provides complete Java implementations for the algorithm.

Recursionalgorithmk-group reversal
0 likes · 7 min read
Reversing a Singly Linked List in K‑Node Groups Starting from the Tail