Skip to content

arrra/meteor-package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##Binary search

###Format: binarySearch(array,target,min,max);


#####min is starting point i.e. 0 index of an array #####max is length of an array

###Use case: ###1.isSorted(array);//MUST USE ###2.binarySearch(array4,9000,0,10000)


My Mac 2.7 GHz Intel Core i7

####benchBoth(array,target) ####benchBoth(array2, 'zip');

###Benchmarked with 300,000+ words ####Naive: 13007715 nanaoseconds ####Binary: 187267 nanaoseconds

###Benchmarked with 10,000 numbers ####Naive: 97943 nanaoseconds ####Binary: 63681 nanaoseconds

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published