Bug fixes and improvements (#1152)

* Update avl_tree.md

* Remove the empty space

* Simplify the heading of the paperbook chapter

* Update hash_map_open_addressing.go to the latest version

* Improvements
This commit is contained in:
Yudong Jin
2024-03-18 13:34:02 +08:00
committed by GitHub
parent 6f1ec66949
commit 7f43f92ae9
15 changed files with 84 additions and 107 deletions

View File

@ -57,7 +57,7 @@ fn bubbleSort(nums: []i32) i32 {
var i: i32 = @as(i32, @intCast(nums.len)) - 1;
while (i > 0) : (i -= 1) {
var j: usize = 0;
// 内循环:将未排序区间 [0, i] 中的最大元素交换至该区间的最右端
// 内循环:将未排序区间 [0, i] 中的最大元素交换至该区间的最右端
while (j < i) : (j += 1) {
if (nums[j] > nums[j + 1]) {
// 交换 nums[j] 与 nums[j + 1]