Created
December 6, 2017 17:27
-
-
Save nhuntwalker/f363a8166819515df354a747e9431af4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write a function to partition a linked list around a value x, such that all nodes less than x come before all nodes greater than or equal to x. | |
[ 4 ] -> [ 3 ] -> [ 1 ] -> [ 2 ] -> [ 5 ] | |
x = 2.5 | |
[ 1 ] -> [ 2 ] -> [ 4 ] -> [ 3 ] -> [ 5 ] | |
Email to: nicholas@codefellows.com by 9:50am |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment