Skip to content

Conversation

@SwaatiR
Copy link
Contributor

@SwaatiR SwaatiR commented Jan 17, 2026

This PR adds a null and empty input check to the Binary Search implementation
to prevent invalid access and improves the JavaDoc to clearly state that the
algorithm requires a sorted array.

No changes were made to the core algorithm logic.

@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 79.05%. Comparing base (48f6322) to head (479245b).

Files with missing lines Patch % Lines
.../java/com/thealgorithms/searches/BinarySearch.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7216      +/-   ##
============================================
- Coverage     79.05%   79.05%   -0.01%     
- Complexity     6945     6946       +1     
============================================
  Files           779      779              
  Lines         22906    22908       +2     
  Branches       4502     4502              
============================================
+ Hits          18109    18110       +1     
  Misses         4077     4077              
- Partials        720      721       +1     

☔ 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.

@DenizAltunkapan DenizAltunkapan enabled auto-merge (squash) January 18, 2026 15:58
@DenizAltunkapan DenizAltunkapan merged commit 79cdb98 into TheAlgorithms:master Jan 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants