Java icon indicating copy to clipboard operation
Java copied to clipboard

[FEATURE REQUEST] Threaded Binary Tree Implementation

Open Shewale41 opened this issue 1 month ago • 1 comments

What would you like to Propose?

Title: Add Threaded Binary Tree Implementation for In-Order Traversal without Recursion


🧠 Overview

A Threaded Binary Tree improves binary tree traversal efficiency by replacing null pointers with in-order predecessor or successor links. This reduces stack usage and recursion overhead.

📂 Implementation Details

  • Folder: src/main/java/com/thealgorithms/datastructures/trees/
  • Filename: ThreadedBinaryTree.java
  • Approach:
    • Implement insertion maintaining threads.
    • Perform in-order traversal using threads (no recursion/stack).

✅ Expected Deliverables

  • Implementation of threaded nodes with flags.
  • Example traversal demonstrating threading.
  • Unit tests confirming correctness.
  • Inline complexity analysis.

🧑‍💻 Additional Notes

This is a great data-structure addition demonstrating memory-efficient tree traversal techniques.

Issue details

🧠 Overview

Introduce a utility class to perform conversions between Celsius, Fahrenheit, and Kelvin scales — a simple but practical use of mathematical formulas.

Additional Information

🧠 Overview

A Threaded Binary Tree improves binary tree traversal efficiency by replacing null pointers with in-order predecessor or successor links. This reduces stack usage and recursion overhead.

Shewale41 avatar Oct 25 '25 13:10 Shewale41