Solved LeetCode program · 86 of 1,000
#0086 · Partition List
Original English source
The values is a list of 1, 4, 3, 2, 5, and 2. The pivot is 3. The lower is an empty list of whole numbers. The upper is an empty list of whole numbers.
For each value in values.
If value is less than pivot, Place value into lower. If value is at least pivot, Place value into upper.
For each value in upper.
Place value into lower.
For each value in lower, report value.
Expected stdout
1 2 2 4 3 5