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 Shewale41 closed this Oct 30, 2025
@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.38%. Comparing base (21eff8a) to head (fd840dd).
⚠️ Report is 5 commits behind head on master.

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    #6992      +/-   ##
============================================
+ Coverage     78.26%   78.38%   +0.11%     
- Complexity     6573     6631      +58     
============================================
  Files           743      747       +4     
  Lines         21895    22066     +171     
  Branches       4288     4330      +42     
============================================
+ Hits          17137    17296     +159     
- Misses         4074     4080       +6     
- Partials        684      690       +6     

☔ 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.

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.

2 participants