Repository navigation
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
@alxkm Hi! I have submitted this PR to add null and empty array safety to ExponentialSearch, make the class public and final for external library callers, use consistent Comparable equality, and expand the test suite. Please review when you have a moment. Thanks! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7651 +/- ##
============================================
- Coverage 82.19% 82.18% -0.01%
Complexity 8379 8379
============================================
Files 842 842
Lines 26101 26101
Branches 5090 5090
============================================
- Hits 21454 21452 -2
Misses 3858 3858
- Partials 789 791 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
alxkm
left a comment
There was a problem hiding this comment.
Looks good. Nice that the edge checks now use compareTo. Thank you for the contribution.
clang-format -i --style=file path/to/your/file.javaDescription
This pull request addresses accessibility, null safety, and consistency in
ExponentialSearch:ExponentialSearchwas package-private, preventing instantiation or usage by callers outsidecom.thealgorithms.searches. Marked the classpublic final class ExponentialSearch implements SearchAlgorithmconsistent with other search algorithms in this package.nullarray, empty array, andnullkey returning-1instead of throwingNullPointerException.array[0].equals(key)andarray[array.length - 1].equals(key)withkey.compareTo(...) == 0for properComparablesemantics.nullarray,nullkey, single-element array with absent target, duplicate elements, and string arrays.