fn partition(arr: &mut [i32], low: usize, high: usize) -> usize
Expand description
Partitions the array into two parts and returns the index of the pivot element.
§Arguments
arr - The array to be partitioned.
low - The starting index of the subarray to be partitioned.
high - The ending index of the subarray to be partitioned.
§Returns
The index of the pivot element.