In a threaded binary tree, the space required for threads is usually:

2025

In a threaded binary tree, the space required for threads is usually:

  1. A.

    Greater than the space required for regular pointers

  2. B.

    Equal to the space required for regular pointers

  3. C.

    Less than the space required for regular pointers

  4. D.

    Unpredictable

Attempted by 209 students.

Show answer & explanation

Correct answer: B

In a threaded binary tree, threads are used to link nodes in inorder traversal. These threads replace the null pointers that would otherwise be present in a regular binary tree. Since threads store the same type of information (memory addresses) as regular pointers, they occupy the same amount of space. For example, if a pointer uses 4 bytes, a thread also uses 4 bytes. This means the space required for threads is equal to the space required for regular pointers.

हिन्दी उत्तर: थ्रेडेड बाइनरी ट्री में, थ्रेड्स का उपयोग इनऑर्डर ट्रैवर्सल में नोड्स को जोड़ने के लिए किया जाता है। ये थ्रेड्स नियमित बाइनरी ट्री में होने वाले नल पॉइंटर्स को बदल देते हैं। चूंकि थ्रेड्स नियमित पॉइंटर्स की तरह ही सूचना (मेमोरी एड्रेस) संग्रहीत करते हैं, इसलिए वे उतनी ही जगह लेते हैं। उदाहरण के लिए, यदि एक पॉइंटर 4 बाइट्स का है, तो थ्रेड भी 4 बाइट्स का होता है। इसलिए थ्रेड्स के लिए आवश्यक स्थान नियमित पॉइंटर्स के लिए आवश्यक स्थान के बराबर होता है।

Explore the full course: Bpsc