← ALL NOTES
Array

2161. Partition Array According to Given Pivot

Given nums and pivot, rearrange so all elements less than pivot come first, then those equal, then those greater — preserving the relative order within the "less" and "greater" groups. Stable…

Loading…