Skip to content

Conversation

@zexxitywave
Copy link

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

Description

Added implementations for Binary Search Tree (BST) and AVL Tree under the Trees category.

Includes:

  • BST: insert, delete, search, findMin, findMax, inorder/preorder/postorder traversal
  • AVL Tree: insert, delete, search with height balancing
  • Rotations: LL, RR, LR, RL
  • Support for duplicates (handled via count variable)
  • Unit tests (JUnit) for validation

✅ All tests have passed successfully.

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 51.08225% with 113 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.05%. Comparing base (2588af0) to head (5e5a5f4).

Files with missing lines Patch % Lines
src/main/java/com/thealgorithms/tree/AVLTree.java 56.88% 33 Missing and 14 partials ⚠️
.../java/com/thealgorithms/tree/BinarySearchTree.java 60.21% 28 Missing and 9 partials ⚠️
src/main/java/com/thealgorithms/tree/Main.java 0.00% 29 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7058      +/-   ##
============================================
- Coverage     78.35%   78.05%   -0.30%     
- Complexity     6671     6720      +49     
============================================
  Files           753      756       +3     
  Lines         22185    22416     +231     
  Branches       4356     4397      +41     
============================================
+ Hits          17382    17497     +115     
- Misses         4105     4196      +91     
- Partials        698      723      +25     

☔ 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