In a binary search tree, which subtree of a node contains elements that are…
2024
In a binary search tree, which subtree of a node contains elements that are greater than the node’s value?
- A.
Left subtree
- B.
Right subtree
- C.
Both subtrees
- D.
More than one of the above
- E.
None of the above
Attempted by 729 students.
Show answer & explanation
Correct answer: B
In a binary search tree (BST), the left subtree of a node contains values less than the node's value, and the right subtree contains values greater than the node's value. This property ensures ordered traversal and efficient search operations.
हिन्दी उत्तर: बाइनरी सर्च ट्री (BST) में, किसी नोड के बायाँ उपवृक्ष में उस नोड के मान से छोटे मान होते हैं, और दायाँ उपवृक्ष में बड़े मान होते हैं। यह गुण व्यवस्थित ट्रैवर्सल और कुशल खोज ऑपरेशन सुनिश्चित करता है।