Skip to content

This Composer package focused on efficient binary searching in PHP. Ideal for quickly locating elements in large sorted arrays.

License

Notifications You must be signed in to change notification settings

alanx15a2/php-binary-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP BINARY SEARCH

Installation

To install the PHP Binary Search package, simply use Composer:

composer require alanx15a2/php-binary-search

Useage example

Important Note: Binary search can only be performed on a SORTED ARRAY!

array_search_binary($array, $target);

If the target element is found, the function will return the key of the element. Otherwise, it will return -1.

About

This Composer package focused on efficient binary searching in PHP. Ideal for quickly locating elements in large sorted arrays.

Topics

Resources

License

Stars

Watchers

Forks

Languages