Skip to content

Fix IterativeBinarySearch implementation and resolve build issues#7332

Merged
DenizAltunkapan merged 2 commits intoTheAlgorithms:masterfrom
AbhiramSakha:patch-5
Mar 26, 2026
Merged

Fix IterativeBinarySearch implementation and resolve build issues#7332
DenizAltunkapan merged 2 commits intoTheAlgorithms:masterfrom
AbhiramSakha:patch-5

Conversation

@AbhiramSakha
Copy link
Contributor

📌 Description

Improved the IterativeBinarySearch implementation to ensure correctness, readability, and compliance with repository standards.

✅ Changes Made

  • Fixed binary search logic to follow standard implementation
  • Added null and empty array handling
  • Improved variable naming (left, right, mid)
  • Cleaned up formatting to satisfy clang-format
  • Updated JavaDoc for better readability

🧪 Testing

  • Verified with normal input arrays
  • Tested edge cases (null and empty arrays)

📋 Checklist

  • I have read CONTRIBUTING.md
  • This pull request is all my own work
  • Code follows Java naming conventions
  • Code is properly formatted

@codecov-commenter
Copy link

codecov-commenter commented Mar 21, 2026

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 79.45%. Comparing base (2927595) to head (8a4e17b).

Files with missing lines Patch % Lines
.../thealgorithms/searches/IterativeBinarySearch.java 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7332      +/-   ##
============================================
- Coverage     79.45%   79.45%   -0.01%     
- Complexity     7082     7084       +2     
============================================
  Files           790      790              
  Lines         23161    23164       +3     
  Branches       4556     4556              
============================================
+ Hits          18403    18405       +2     
  Misses         4022     4022              
- Partials        736      737       +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) March 26, 2026 18:40
@DenizAltunkapan DenizAltunkapan merged commit ebcf5ad into TheAlgorithms:master Mar 26, 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