Loading page…
A chat app needs its thread newest first, a stretch flipped, every k messages reversed and a mirror check, all without copying. The lecture turns the arrows of a chain around in place: the whole chain, a stretch with its two reconnecting links, every k nodes with a check that a full group remains, and half a chain for a palindrome check and a reorder, with every pointer change traced and the classic mistakes.
A chat thread is a chain of nodes.