Skip to content

Conversation

@Shewale41
Copy link

🧩 Add Threaded Binary Tree Implementation

Summary:
This PR adds a Threaded Binary Tree algorithm under com.thealgorithms.datastructures.trees.
It supports efficient in-order traversal without using recursion or a stack by leveraging in-order threading.

Key Features:

  • Implements threaded binary tree insertion logic
  • Supports in-order traversal via thread links
  • Handles duplicate values deterministically (duplicates go to right subtree)
  • Includes comprehensive JUnit tests for validation

References:

Checklist:

  • Code follows the repo’s Java and clang-format style
  • Added unit tests (ThreadedBinaryTreeTest.java)
  • Build and tests pass successfully

@Shewale41
Copy link
Author

Shewale41 commented Oct 30, 2025

Hey @DenizAltunkapan @yanglbme @alxkm 👋 can you please review this PR , I have cleared all the checks can you merge my PR.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant