2010年10月6日

Step 2: Delete

摘要: 5.5.2 Step 2: Delete At this point, we've identified p as the node to delete. The node on the top of the stack, da[k - 1], is p's parent node. There are the same three cases we saw in deletion from an... 阅读全文

posted @ 2010-10-06 21:55 sohu2000000 阅读(115) 评论(0) 推荐(1) 编辑

Step 1: Search

摘要: 5.5.1 Step 1: Search The only difference between this search and an ordinary search in a BST is that we have to keep track of the nodes above the one we're deleting. We do this by pushing them onto th... 阅读全文

posted @ 2010-10-06 04:40 sohu2000000 阅读(167) 评论(0) 推荐(1) 编辑

Deletion

摘要: 5.5 Deletion Deletion in an AVL tree is remarkably similar to insertion. The steps that we go through are analogous: Search for the item to delete. Delete the item. Update balance factors. Rebalance t... 阅读全文

posted @ 2010-10-06 04:08 sohu2000000 阅读(465) 评论(0) 推荐(1) 编辑

导航