TLDR: Fractional Cascading - Speeding Up Multiple Binary Searches
Date: 2020-05-10 Source: https://arpitbhayani.me/blogs/fractional-cascading
Overview
Explore Binary Search variations k-searches, unified search & fractional cascading. Optimize search time in k sorted lists! Binary Search is an algorithm that finds the position of a target value in a sorted list.
Key Points
- Binary Search is an algorithm that finds the position of a target value in a sorted list.
- Time and Space Complexity: Each of the k lists have size n and we know the time complexity of performing a binary search in one list of n elements is O(log(n)).
- Preprocess: The preprocessing is done in two phases; in the first phase, we compute a position tuple for each element and associate it with the same.
- Working: Given a target value, we perform a binary search in the above auxiliary list and get the smallest element greater than or equal to this target value.