()h ()h ()H=ëlogNû+
用順序存儲二叉樹時要按完全二叉樹的形式存儲非完全二叉樹存儲時要加虛結點設編號為i和j的結點在順序存儲中的下標為s 和t 則結點i和j在同一層上的條件是ëlogsû=ëlogtû
ëlogiû=ëlogjû
() ()(n)/ ()(n+)/ () ëlognû +
n
N+
() K+ () k+
ëN/û
k
[] [] [] [] [] [] [] [] [] []
From:http://tw.wingwit.com/Article/program/sjjg/201311/23160.html