Approach hintTry it first, then revealHide
Use a dummy node and, for each pair, rewire three links: the node before the pair, the first node and the second node. Draw the pointers once before coding; a recursive version is also short.
Use a dummy node and, for each pair, rewire three links: the node before the pair, the first node and the second node. Draw the pointers once before coding; a recursive version is also short.