feat: add OptimalBinarySearchTree algorithm#7310
Merged
DenizAltunkapan merged 2 commits intoApr 3, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7310 +/- ##
============================================
+ Coverage 79.39% 79.44% +0.04%
- Complexity 7092 7114 +22
============================================
Files 792 793 +1
Lines 23226 23273 +47
Branches 4568 4583 +15
============================================
+ Hits 18441 18489 +48
Misses 4047 4047
+ Partials 738 737 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
oleksii-tumanov
marked this pull request as ready for review
March 14, 2026 01:40
oleksii-tumanov
requested review from
DenizAltunkapan,
alxkm and
yanglbme
as code owners
March 14, 2026 01:40
oleksii-tumanov
force-pushed
the
optimal-binary-search-tree
branch
from
March 17, 2026 16:18
3eeb06a to
04c7665
Compare
DenizAltunkapan
approved these changes
Apr 3, 2026
DenizAltunkapan
enabled auto-merge (squash)
April 3, 2026 11:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
clang-format -i --style=file path/to/your/file.javaDescription
Adds an implementation of Optimal Binary Search Tree using dynamic programming with Knuth's optimization.
The implementation:
This pull request adds:
OptimalBinarySearchTreeOptimalBinarySearchTreeTestCloses #7309
Test Case
Validated with:
0[12, 10, 20, 42, 25, 37][8, 34, 50, 3, 40, 30]324Commands used:
mvn -Dtest=OptimalBinarySearchTreeTest testmvn -DskipTests checkstyle:check