Skip to content

wileylooper/regressionsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

RegressionSearch

RegressionSearch provides enhanced speed as an ideal alternative to non-interpolated Binary Search implementations that expect haystack.Length to be greater than 3 on a frequent basis.

RegressionSearch searches for the first occurence of a needle element in a haystack array that contains elements sorted in ascending order, provided the integral data type of each element in haystack matches needle. When an element is found, it returns the index of the found element. When an element isn’t found, it returns -1.

Languages