Sort Linked List with Arbitrary Pointers
Filed under HashedIn
The question
Given a linked list where each node has data and two pointers (one to the next node and another pointing to an arbitrary node in the list), sort the list and properly point the arbitrary pointers to their correct nodes.
No write-up yet. Related questions below have one.
Related HashedIn questions
Collected from public candidate posts and coding forums. Updated Nov 2026.