Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Binary Search Tree and AVL Tree implementations with tests#7058

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
zexxitywave wants to merge1 commit intoTheAlgorithms:master
base:master
Choose a base branch
Loading
fromzexxitywave:add-bst-avl-trees

Conversation

@zexxitywave
Copy link

  • I have readCONTRIBUTING.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 withclang-format -i --style=file path/to/your/file.java

Description

Added implementations forBinary Search Tree (BST) andAVL Tree under theTrees 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 is51.08225% with113 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.05%. Comparing base (2588af0) to head (5e5a5f4).

Files with missing linesPatch %Lines
src/main/java/com/thealgorithms/tree/AVLTree.java56.88%33 Missing and 14 partials⚠️
.../java/com/thealgorithms/tree/BinarySearchTree.java60.21%28 Missing and 9 partials⚠️
src/main/java/com/thealgorithms/tree/Main.java0.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 freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@DenizAltunkapanDenizAltunkapanAwaiting requested review from DenizAltunkapanDenizAltunkapan is a code owner

@yanglbmeyanglbmeAwaiting requested review from yanglbmeyanglbme is a code owner

@alxkmalxkmAwaiting requested review from alxkmalxkm is a code owner

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@zexxitywave@codecov-commenter

[8]ページ先頭

©2009-2025 Movatter.jp