In a Binary Search Tree (BST), the operation of deleting a node with one child involves:एक बाइनरी सर्च ट्री (BST) में, एक बच्चे के साथ नोड को हटाने का संचालन शामिल है:
Show answerHide answer
Correct answer: (C) Removing the node and replacing it with its parentनोड को हटाना और इसे अपने माता -पिता के साथ बदलना
Explanation
Note: the answer key gives (C), but a BST node with one child is deleted by replacing it with its only child (which may be left or right), not with its parent. The rest of the subtree stays in order.नोट: आधिकारिक उत्तर कुंजी (C) देती है, लेकिन एक बच्चे वाले BST नोड को हटाने में उसे उसके इकलौते बच्चे (बाएँ या दाएँ) से बदला जाता है, उसके parent से नहीं। बाकी उप-वृक्ष क्रम में रहता है।