mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-24 02:21:30 +08:00
build
This commit is contained in:
@@ -69,13 +69,6 @@ After the pivot partitioning, the original array is divided into three parts: le
|
||||
=== "C++"
|
||||
|
||||
```cpp title="quick_sort.cpp"
|
||||
/* Swap elements */
|
||||
void swap(vector<int> &nums, int i, int j) {
|
||||
int tmp = nums[i];
|
||||
nums[i] = nums[j];
|
||||
nums[j] = tmp;
|
||||
}
|
||||
|
||||
/* Partition */
|
||||
int partition(vector<int> &nums, int left, int right) {
|
||||
// Use nums[left] as the pivot
|
||||
|
||||
Reference in New Issue
Block a user