A threaded binary tree is a binary tree in which:

2025

A threaded binary tree is a binary tree in which:

  1. A.

    Each node has two children

  2. B.

    Each node has at most one child

  3. C.

    Each node is connected to its parent

  4. D.

    Each node has a thread connecting it to its predecessor or successor

Attempted by 230 students.

Show answer & explanation

Correct answer: D

A threaded binary tree is a binary tree where null pointers are replaced with references to inorder predecessor or successor. These references are called threads. This allows for efficient inorder traversal without recursion or a stack. Threads are used to connect nodes to their inorder predecessor or successor, enabling faster traversal. The main advantage is that it reduces space complexity for traversal operations.

हिन्दी उत्तर: थ्रेडेड बाइनरी ट्री वह बाइनरी ट्री है जिसमें खाली पॉइंटर्स को इनऑर्डर प्रीडेसेसर या सुसेसर से जुड़े रेफरेंस से बदल दिया जाता है। इन रेफरेंस को थ्रेड कहा जाता है। इससे बिना रिकर्शन या स्टैक के इनऑर्डर ट्रैवर्सल का अधिक कुशल तरीका बन जाता है। थ्रेड्स का उपयोग नोड्स को उनके इनऑर्डर प्रीडेसेसर या सुसेसर से जोड़ने के लिए किया जाता है, जिससे तेजी से ट्रैवर्सल संभव होता है। मुख्य लाभ यह है कि यह ट्रैवर्सल ऑपरेशन के लिए स्पेस कॉम्प्लेक्सिटी को कम करता है।

Explore the full course: Bpsc