AVL树 - 理解记忆与编程题模板(PAT 1066 Root of AVL Tree)
AVL树的编程题比较麻烦,如果不是对AVL很了解就很容易写错。即使写对也会浪费时间。下面针对AVL编程问题的一个典例来理解和掌握AVL树问题的基本操作。理解和记忆之后可以在考试中直接用。
问题:
1066 Root of AVL Tree (25 分)
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.
转载
2021-09-07 19:49:19 ·
133 阅读 ·
0 评论