CodeX
Published in

CodeX

The Fastest Searching Algorithm: Binary Search in Ruby

Photo by Flavio Takemoto

I am going to start off by saying that this is the fastest searching algorithm with a few caveats. For starters, the data structure that is being search through needs to be sorted. Also, there are some nuances regarding some other algorithms that may search quicker depending on how evenly distributed the sorted data is. But for the most part, if you are looking for an element in a data structure…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Anthony Lepore

Anthony Lepore

Composer, playwright, designer for theater, jazz musician, philosopher, software engineer and technical writer for a FinTech firm in NYC. More: ViolaCello93.com