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 Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (master@fd0bcb7). Learn more about missing BASE report.

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%           
  Complexity        ?     6945           
=========================================
  Files             ?      779           
  Lines             ?    22908           
  Branches          ?     4502           
=========================================
  Hits              ?    18109           
  Misses            ?     4077           
  Partials          ?      722           

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

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.

2 participants