Skip to content

Daily: 2026-10-24 — Binary Search - #11

Merged
GAjay merged 1 commit into
mainfrom
daily/2026-10-24-binary-search
Oct 24, 2026
Merged

GAjay merged 1 commit into
mainfrom
daily/2026-10-24-binary-search

Conversation

@cursor

@cursor cursor Bot commented Oct 24, 2026

Copy link
Copy Markdown

Problem

  • Slug: binary-search
  • Folder: problems/2026-10-24-binary-search

Approach

Implemented classic binary search on a sorted array with two pointers (lo, hi). Each step compares nums[mid] to target, narrows the range, and returns the index when found or -1 when the range is empty. Runs in O(log n) time and O(1) space.

Tests

node --test problems/2026-10-24-binary-search/binary-search.test.js
npm run test:ci

Both passed (3 tests for today's problem; 35 total in CI).

Open in Web View Automation 

@GAjay
GAjay marked this pull request as ready for review October 24, 2026 08:36
@GAjay
GAjay merged commit 8cc56ee into main Oct 24, 2026
1 check 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.

1 participant