One more fairly standard tech interview problem (for better or for worse, you’re likely to see one of these if you go for a programming job):
Given a linked list and an element
x
. Partition the list so that all elements less thanx
are before elements greater than or equal tox
, but do not otherwise change the order of the elements.