mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-12 07:26:07 +00:00
build
This commit is contained in:
@@ -202,6 +202,13 @@ comments: true
|
||||
=== "C"
|
||||
|
||||
```c title="quick_sort.c"
|
||||
/* 元素交换 */
|
||||
void swap(int nums[], int i, int j) {
|
||||
int tmp = nums[i];
|
||||
nums[i] = nums[j];
|
||||
nums[j] = tmp;
|
||||
}
|
||||
|
||||
/* 快速排序类 */
|
||||
// 快速排序类-哨兵划分
|
||||
int partition(int nums[], int left, int right) {
|
||||
|
||||
Reference in New Issue
Block a user