In a balanced binary tree, the height of two sub-trees of every node can not…
2024
In a balanced binary tree, the height of two sub-trees of every node can not differ by more than ______.
- A.
2
- B.
1
- C.
0
- D.
More than one of the above
- E.
None of the above
Attempted by 720 students.
Show answer & explanation
Correct answer: B
In a balanced binary tree, the height of the left and right subtrees of any node must differ by at most 1. This ensures the tree remains efficient for operations like search, insert, and delete.
Step 1: Understand the definition of a balanced binary tree. Step 2: The height difference between left and right subtrees of any node should not exceed 1. Step 3: This condition is satisfied only when the difference is 1 or less.
हिन्दी उत्तर:
एक संतुलित बाइनरी ट्री में, किसी भी नोड के बाएँ और दाएँ उपवृक्षों की ऊँचाई में अंतर अधिकतम 1 हो सकता है। यह सुनिश्चित करता है कि ट्री खोज, डालना और हटाने जैसे ऑपरेशनों के लिए कुशल रहे।
Step 1: संतुलित बाइनरी ट्री की परिभाषा को समझें। Step 2: किसी भी नोड के बाएँ और दाएँ उपवृक्षों की ऊँचाई में अंतर 1 से अधिक नहीं होना चाहिए। Step 3: यह शर्त केवल तभी संतुष्ट होती है जब अंतर 1 या उससे कम हो।