← ALL NOTES
Linked List

86. Partition List

Stable partition by the predicate val < x: everything smaller keeps its relative order, then everything ≥ x keeps its. The clean way is to build two separate lists as you scan — one for the smaller…

Loading…