-
Notifications
You must be signed in to change notification settings - Fork 20.1k
Add Jump Search algorithm in Java #6407
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6407 +/- ##
============================================
- Coverage 74.65% 74.64% -0.01%
Complexity 5459 5459
============================================
Files 682 682
Lines 19010 19016 +6
Branches 3670 3671 +1
============================================
+ Hits 14191 14195 +4
- Misses 4259 4261 +2
Partials 560 560 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
All required checks have passed except |
The older version is preferable because it is generic, allowing searches on any comparable type, not just primitive int. It also implements a standard SearchAlgorithm interface, which improves code modularity, testability, and reuse. The new version’s static methods and manual conversion from Integer[] to int[] introduce unnecessary overhead and reduce flexibility. Therefore, i would say the older version is cleaner, more extensible... @alxkm thoughts? |
@DenizAltunkapan, I completely agree with your point. The current approach closely follows the design principles used in the Java Collections Framework, which is an industry standard. Since this is primarily a study repository, exposing students to this kind of structure - using interfaces, generic types, and modular design - helps them build knowledge that aligns with industry standards and is directly applicable to professional development. |
Added an implementation of the Jump Search algorithm in Java.
This is part of my first real code-based open source contribution.