How to partition a linked list around a node with a certain value
Here is one way to partition a linked list around a value x such that all nodes less than x comes before all nodes greater than or equal to x.
|
|
Tests can be found at REPL.it
Here is one way to partition a linked list around a value x such that all nodes less than x comes before all nodes greater than or equal to x.
|
|
Tests can be found at REPL.it