mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 21:24:53 +08:00
Bug fixes and improvements (#1348)
* Add "reference" for EN version. Bug fixes. * Unify the figure reference as "the figure below" and "the figure above". Bug fixes. * Format the EN markdown files. * Replace "" with <u></u> for EN version and bug fixes * Fix biary_tree_dfs.png * Fix biary_tree_dfs.png * Fix zh-hant/biary_tree_dfs.png * Fix heap_sort_step1.png * Sync zh and zh-hant versions. * Bug fixes * Fix EN figures * Bug fixes * Fix the figure labels for EN version
This commit is contained in:
@ -9,7 +9,6 @@ class QuickSort
|
||||
class << self
|
||||
### 哨兵划分 ###
|
||||
def partition(nums, left, right)
|
||||
|
||||
# 以 nums[left] 为基准数
|
||||
i, j = left, right
|
||||
while i < j
|
||||
@ -116,7 +115,7 @@ class QuickSortTailCall
|
||||
i # 返回基准数的索引
|
||||
end
|
||||
|
||||
### 快速排序(尾递归优化)
|
||||
### 快速排序(尾递归优化)###
|
||||
def quick_sort(nums, left, right)
|
||||
# 子数组长度不为 1 时递归
|
||||
while left < right
|
||||
|
||||
Reference in New Issue
Block a user