mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 12:58:42 +08:00
Bug fixes and improvements (#1572)
* Sync zh and zh-hant versions. * Remove the polyfill.io link from mkdocs.yml * Update contributors' info for code reviewers and en/zh-hant versions reviewers. * Fix graph.md * Update avatars for English version reviewers. * Sync zh and zh-hant versions. * Fix two_sum_brute_force.png * Sync zh and zh-hant versions. Optimize structrue of index.html. * Format index.html
This commit is contained in:
@ -157,8 +157,8 @@
|
||||
/* 初始化堆積 */
|
||||
// 初始化小頂堆積
|
||||
PriorityQueue<int, int> minHeap = new();
|
||||
// 初始化大頂堆積(使用 lambda 表示式修改 Comparator 即可)
|
||||
PriorityQueue<int, int> maxHeap = new(Comparer<int>.Create((x, y) => y - x));
|
||||
// 初始化大頂堆積(使用 lambda 表示式修改 Comparer 即可)
|
||||
PriorityQueue<int, int> maxHeap = new(Comparer<int>.Create((x, y) => y.CompareTo(x)));
|
||||
|
||||
/* 元素入堆積 */
|
||||
maxHeap.Enqueue(1, 1);
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
@ -180,7 +180,7 @@ AVL 樹既是二元搜尋樹,也是平衡二元樹,同時滿足這兩類二
|
||||
|
||||
```c title=""
|
||||
/* AVL 樹節點結構體 */
|
||||
TreeNode struct TreeNode {
|
||||
typedef struct TreeNode {
|
||||
int val;
|
||||
int height;
|
||||
struct TreeNode *left;
|
||||
|
||||
@ -372,4 +372,4 @@
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
Reference in New Issue
Block a user