看板 Grad-ProbAsk 關於我們 聯絡資訊
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