Question 58Asked in Bihar STET 2025 Paper II Computer Science, 3 Nov 2025, Shift 2 (2:00 PM) + 1 more paper

In a Binary Search Tree (BST), the operation of deleting a node with one child involves:एक बाइनरी सर्च ट्री (BST) में, एक बच्चे के साथ नोड को हटाने का संचालन शामिल है:

एक बाइनरी सर्च ट्री (BST) में, एक बच्चे के साथ नोड को हटाने का संचालन शामिल है:
  1. ARemoving the node and replacing it with its left childनोड को हटाना और इसे अपने बाएं बच्चे के साथ बदलना
  2. BRemoving the node and replacing it with its right childनोड को हटाना और इसे अपने दाहिने बच्चे के साथ बदलना
  3. CRemoving the node and replacing it with its parentनोड को हटाना और इसे अपने माता -पिता के साथ बदलना
  4. DRemoving the node and leaving the subtree unalteredनोड को हटाना और सबट्री को छोड़ देना
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 से नहीं। बाकी उप-वृक्ष क्रम में रहता है।

From Bihar STET 2025 Paper II Computer Science PYQ, 3 Nov 2025, Shift 2 (2:00 PM)

This is question 58 of Bihar STET 2025 Paper II Computer Science PYQ, 3 Nov 2025, Shift 2 (2:00 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.

Asked in 2 papers