01. 链表排序知识 #26
Replies: 0 comments 5 replies
-
list_min, list_max = float('inf'), float('-inf') |
Beta Was this translation helpful? Give feedback.
-
没有吧。list_min 初始值设为无穷大值,这样在查找到比 list_min 小的值时,会重新对 list_min 进行赋值。从而找到链表中最小值。 |
Beta Was this translation helpful? Give feedback.
-
8.2 链表桶排序代码实现 的第83行“for bucket_head in buckets”有些不懂,buckets中的元素(即bucket_head)不还是列表吗?在代码里为为啥把他当成一个链表的头节点呢? |
Beta Was this translation helpful? Give feedback.
-
抱歉,之前代码中写错了。这里的 代码已改正,稍后更新文章哈~ |
Beta Was this translation helpful? Give feedback.
-
01.链表排序知识 | 算法通关手册
链表排序知识 # 1. 链表排序简介 # 在数组排序中,常见的排序算法有:冒泡排序、选择排序、插入排序、希尔排序、归并排序、快速排序、堆排序、计数排序、
https://algo.itcharge.cn/02.Linked-List/02.Linked-List-Sort/01.Linked-List-Sort/
Beta Was this translation helpful? Give feedback.
All reactions