07. 堆排序 #60
utterances-bot
started this conversation in
Comments
07. 堆排序
#60
Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
-
还看不懂的话,可以来堆可视化页面看下动画演示吧。 提供了多种堆操作的可视化演示。你可以通过界面上的切换按钮在大根堆和小根堆之间自由切换,切换时系统会自动重新构建整个堆结构。 在输入框中输入数字并点击"插入节点"按钮,可以观察新节点如何通过上浮(heapify up)操作找到其正确位置。 当点击"删除根节点"按钮时,你将看到堆顶元素被移除,以及最后一个节点如何通过下沉(heapify down)操作重建堆的平衡。删除的节点会在右侧短暂显示,随后会消失。 此外,页面还提供了随机初始化功能,可以快速生成一个包含10到50个随机数值的新堆,方便进行各种测试和观察。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
07.堆排序 | 算法通关手册
堆排序 # 1. 堆排序算法思想 # 堆排序(Heap sort)基本思想: 借用「堆结构」所设计的排序算法。将数组转化为大顶堆,重复从大顶堆中取出数值最大
https://algo.itcharge.cn/01.Array/02.Array-Sort/07.Array-Heap-Sort/
Beta Was this translation helpful? Give feedback.
All reactions