Skip to main content

Checkpoint: The Linked Toolkit

intermediate24 min readLesson 112 of 148

Prove the pointer surgery: in-place merge of two sorted lists with zero allocation.

The task

Implement s_merge_sorted (see the challenge). This is the module's harvest: you must walk two lists, splice nodes without allocating, keep duplicates, handle either-empty inputs, and leave both input heads NULL — pure pointer surgery under contract.

Passing this proves you can build the canonical linked-list operation that every higher structure (merge sort, LRU splices, intrusive lists) rests on.

Next module: hash tables — arrays of nodes, hashing, and collision handling.