-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Description
Good morning! Here's your coding interview problem for today.
This problem was asked by Amazon.
Given a pivot x, and a list lst, partition the list into three parts.
- The first part contains all elements in
lstthat are less thanx - The second part contains all elements in
lstthat are equal tox - The third part contains all elements in
lstthat are larger thanx
Ordering within a part can be arbitrary.
For example, given x = 10 and lst = [9, 12, 3, 5, 14, 10, 10], one partition may be [9, 3, 5, 10, 10, 12, 14].
Metadata
Metadata
Assignees
Labels
No labels