0%

可能有人会觉得自带的#标签比较丑,那么可以考虑更改themes\next\layout\_macro\post.swig来更换一个图标

阅读全文 »

  有这样一个问题:如何从一个无序的数组里求出第\(K\)大的数(为了简化讨论,假设数组中的数各不相同),例如,对数组\(\{ 5, 12, 7, 2, 9, 3\}\)来说,第三大的数是5,第五大的数是9。

阅读全文 »

交换排序(冒泡排序,快速排序),插入排序(直接插入排序,希尔排序),选择排序(简单选择排序,堆排序),归并排序,基数排序

阅读全文 »

将一系列给定数字插入一个初始为空的小顶堆H[]。随后对任意给定的下标i,打印从H[i]到根结点的路径。

阅读全文 »

An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more than one, rebalancing is done to restore this property.

阅读全文 »