作者afulist (亚弗利斯特)
看板Grad-ProbAsk
标题[理工] [资结]-中正96-资工所
时间Thu Oct 15 23:46:12 2009
If you perform the operation delete (15) on a binary search tree. it will
obviously delete element with key 15 from the preorder traversel of the tree.
For example, if the preorder traversel was (15,10,8,6,3) before the deletion.
then it is (10,8,6,3) after the deletion. But can the operation delete (15)
ever change the order of keys in a preorder traversel? If "yes" give an
example. If "no" explain why.
应该是问delete BST会不会改变preorder的顺序
题目中是举左斜树的例子 但是想一想还是不太会回答
有人可以帮忙解这题吗?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.44.200.95