Coding Challenge · INTERMEDIATE
Given the head of a singly linked list and an integer x, partition the list such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the nodes in each of the two partitions.