Question
Option 3 : 20 40 50 60 70 80 / 20 40 50 60 70 80
Detailed Solution
सही उत्तर 20 40 50 60 70 80 / 20 40 50 60 70 80 है।
Question:
In the BST built above (keys 50, 30, 70, 20, 40, 60, 80), node 30 is deleted using the inorder-successor replacement strategy. The inorder traversal after deletion is: / ऊपर निर्मित BST (की 50, 30, 70, 20, 40, 60, 80) में इनऑर्डर-उत्तरवर्ती प्रतिस्थापन रणनीति से नोड 30 हटाया जाता है। हटाने के बाद इनऑर्डर भ्रमण है:
Correct Answer: 20 40 50 60 70 80 / 20 40 50 60 70 80
Node 30 has two children; its inorder successor is 40, which takes 30's place while 40's original position is removed. Inorder remains sorted: 20 40 50 60 70 80. / नोड 30 के दो संतान हैं; इसका इनऑर्डर उत्तरवर्ती 40 है, जो 30 का स्थान लेता है जबकि 40 की मूल स्थिति हट जाती है। इनऑर्डर क्रमबद्ध रहता है: 20 40 50 60 70 80।