krahets 8 months ago
parent cfdb743939
commit bc9bdce3c8

@ -168,8 +168,6 @@ comments: true
=== "Swift" === "Swift"
```swift title="quick_sort.swift" ```swift title="quick_sort.swift"
[class]{}-[func]{swap}
/* 哨兵划分 */ /* 哨兵划分 */
func partition(nums: inout [Int], left: Int, right: Int) -> Int { func partition(nums: inout [Int], left: Int, right: Int) -> Int {
// 以 nums[left] 为基准数 // 以 nums[left] 为基准数

Loading…
Cancel
Save