作者Lattewang (傻傻的研究生)
看板Grad-ProbAsk
标题[问题] 98政大资结
时间Mon Mar 23 14:27:36 2009
4(2) AVL tree 有 n个node 插入一个键值(key),请问时间复杂度为?
(3) AVL tree 有 n个node 进行single rotation LL,请问时间复杂度为?
(4) AVL tree 有 n个node 进行double rotation LR,请问时间复杂度为?
(5) AVL tree 有 n个node 当要找最大值,请问时间复杂度为?
请版上大大不吝指教以上几题,感恩~
--
少年不识愁滋味,爱上层楼。
爱上层楼,为赋新词强说愁。
而今识尽愁滋味,欲说还休。
欲说还休,却道天凉好个秋!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 203.68.164.20
1F:推 thank1984:这题我2)跟5)都写O(lgn) 3) 4) 我写O(1) 03/23 14:56
2F:推 decimal:我跟楼上写一样~ 03/23 16:22
3F:推 cspao:我也跟楼上写一样= c = 03/23 19:03