Skip to content

Conversation

@Shewale41
Copy link
Contributor

🧩 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
Contributor 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.

@DenizAltunkapan DenizAltunkapan enabled auto-merge (squash) December 1, 2025 20:10
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 90.19608% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.61%. Comparing base (ac6fef1) to head (ca6be2f).

Files with missing lines Patch % Lines
...ithms/datastructures/trees/ThreadedBinaryTree.java 90.19% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6995      +/-   ##
============================================
+ Coverage     78.57%   78.61%   +0.03%     
- Complexity     6800     6815      +15     
============================================
  Files           763      764       +1     
  Lines         22529    22580      +51     
  Branches       4431     4441      +10     
============================================
+ Hits          17703    17751      +48     
- Misses         4115     4116       +1     
- Partials        711      713       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DenizAltunkapan DenizAltunkapan merged commit 14c0b08 into TheAlgorithms:master Dec 1, 2025
7 checks passed
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.

3 participants