AVL 樹係一種自平衡二元搜尋樹,識得將自己兩樖 subtree 嘅高度差異保持係「頂攏 1 咁多」,方法係定時定候 rotate 樖二元搜尋樹[1]:Ch. 48-49

AVL 樹嘅例子示範

睇埋 編輯

參考資料 編輯

  1. John Bullinaria, (2019). Lecture Notes for Data Structures and Algorithms (PDF). School of Computer Science, University of Birmingham.