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.
|
Hi @alxkm, submitted this PR to fix a sentinel termination bug where encountering a |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7654 +/- ##
============================================
+ Coverage 82.19% 82.20% +0.01%
- Complexity 8381 8383 +2
============================================
Files 842 842
Lines 26101 26101
Branches 5090 5090
============================================
+ Hits 21454 21457 +3
+ Misses 3858 3857 -1
+ Partials 789 787 -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. Thank you for the contribution.
|
Thanks @alxkm |
Description
This pull request fixes a search termination bug in \SentinelLinearSearch:
ull\ element in the array, incorrectly returning the index of the
ull\ element as if it were the target key. Updated to \while (array[i] == null || array[i].compareTo(key) != 0)\ so null elements are properly skipped until a matching element or sentinel is reached.
ull\ elements precede the target, when the target is absent in an array containing
ull\ elements, and when multiple
ull\ elements exist.
CC: @alxkm for review