FrontendX
Partition Around Pivot
medium
Description
AI Assistance
Solution
Test Cases
Test Result
Submissions
Canvas
Partition Around
Pivot
Reorder array into less
Examples
Example 1
Input:
[1,2,3]
Output:
[1,2,3]
Example 2
Input:
[1,2,3]
Output:
[1,2,3]
Hints
Hint 1
Elements less than pivot go to the left.
Hint 2
Elements equal to pivot can go anywhere.
Hint 3
Elements greater than pivot go to the right.
Partition Around Pivot
Reorder array into less