← 返回首页
feat: add meta binary search implementation by nickzerjeski · Pull Request #1894 · TheAlgorithms/JavaScript · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

feat: add meta binary search implementation#1894

Closed
nickzerjeski wants to merge 4 commits into
TheAlgorithms:masterfrom
nickzerjeski:feat-meta-binary-search-1835
Closed

feat: add meta binary search implementation#1894
nickzerjeski wants to merge 4 commits into
TheAlgorithms:masterfrom
nickzerjeski:feat-meta-binary-search-1835

Conversation

Copy link
Copy Markdown

Describe your change:

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Added Search/MetaBinarySearch.js with tests in Search/test/MetaBinarySearch.test.js.
This contributes to the issue request for additional searching/sorting algorithm coverage.

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new JavaScript files are placed inside an existing directory.
  • All filenames should use the UpperCamelCase (PascalCase) style. There should be no spaces in filenames.
  • All new algorithms have a URL in their comments that points to Wikipedia or another similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

Tests

  • npm test -- MetaBinarySearch

Fixes #1835

nickzerjeski requested a review from appgurueu as a code owner April 13, 2026 09:02
Copilot AI review requested due to automatic review settings April 13, 2026 09:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Pull request overview

Adds a new “Meta Binary Search” algorithm implementation to the Search/ algorithms collection, along with a dedicated Jest test suite, expanding coverage requested in #1835.

Changes:

  • Added metaBinarySearch implementation in Search/MetaBinarySearch.js.
  • Added Jest tests for numeric, string, missing-target, and empty-array cases in Search/test/MetaBinarySearch.test.js.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
Search/MetaBinarySearch.js Introduces the meta binary search implementation and its public export.
Search/test/MetaBinarySearch.test.js Adds a test suite validating core expected behavior for the new search algorithm.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Search/MetaBinarySearch.js Outdated Show resolved Hide resolved
Comment thread Search/MetaBinarySearch.js Outdated Show resolved Hide resolved
Comment thread Search/test/MetaBinarySearch.test.js Show resolved Hide resolved
nickzerjeski force-pushed the feat-meta-binary-search-1835 branch from 89dda91 to 0de1aa1 Compare April 13, 2026 09:08
Copy link
Copy Markdown

codecov-commenter commented Apr 13, 2026
edited
Loading

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.93%. Comparing base (5c39e87) to head (031541d).

Additional details and impacted files
@@ Coverage Diff @@ ## master #1894 +/- ## ========================================== + Coverage 85.91% 85.93% +0.01% ========================================== Files 379 380 +1 Lines 19778 19806 +28 Branches 3016 3022 +6 ========================================== + Hits 16993 17021 +28 Misses 2785 2785

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Author

@copilot apply changes based on the comments in this thread

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

[FEATURE]: Searching & Sorting Algorithms

3 participants

Footer

© 2026 GitHub, Inc.