nas5w / javascript-patterns

A collection of javascript algorithms, patterns, and techniques
MIT License
293 stars 69 forks source link

reduce the range to search for exponential search #119

Closed coderavels closed 4 years ago

coderavels commented 5 years ago

Once we know the upper bound for the element to exist, we only to have to search between half of the upperbound and the upperbound.

codecov-io commented 5 years ago

Codecov Report

Merging #119 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #119   +/-   ##
=======================================
  Coverage   99.64%   99.64%           
=======================================
  Files          37       37           
  Lines         561      561           
  Branches       83       83           
=======================================
  Hits          559      559           
  Misses          2        2
Impacted Files Coverage Δ
src/algorithms/searching/exponentialSearch.js 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1f4372a...fcff892. Read the comment docs.