Linked-list minimum extraction (source code)

= Linked-list minimum extraction

Scan a nonempty <linked list> while remembering the predecessor of its least-valued node. A <sentinel node> supplies a predecessor even when the minimum is the first data node. Once the scan ends, bypass the selected node and detach its outgoing link. Using strict comparison retains the first occurrence among tied minima. Repeated extraction and tail-appending gives stable <selection sort> without replacing the data nodes or collapsing equal values.