Data Structures and Algorithms with Elixir

Today it was Binary Search. Unfortunately I used Elixir lists for binary search for today’s version, therefore making this an O(n) attempt, equal or worse than linear search. I will try out an array version later, even that’s not O(1) (Nothing is in immutable world?). This is just for showing the mechanism of binary search without any of its benefits gained in a language with real arrays.

Here’s the link: Binary Search

4 Likes