Hardware interview practice
Quicksort a dynamic array
Sort a dynamic array of integers in ascending order using recursive quicksort.
Reviewed example
Work through one case
Input
values = [7, 2, 9, 2, 5]Expected output
[2, 2, 5, 7, 9]Partitioning places the pivot in its final position and recursively sorts the two bounded subranges.
What to cover
Requirements
- Partition each range around one pivot.
- Recurse only on valid subranges.
- Modify the input array in place.
