Logo
YouTubeDiscord
Constant Time
Constant Time
/Binary Search
Binary Search
Binary Search

Binary Search

If you find a better roadmap on binary search I will send you $50

7 patterns, 29 problems, 150 illustrations, 60000 words and whole lot of ❤️

  1. Binary Search
    1. Binary Search (Vanilla) ⭐
    2. Real-life applications
    3. Find the First True in a Sorted Boolean Array ⭐
    4. Binary search Vanilla to Chocolate
  2. A Deeper Dive into Binary Search
    1. Thought Experiment, Does an array need to be sorted to run Binary Search? ⭐
    2. 1st and last occurrence of an Element in a Sorted Array ⭐
    3. Find the number of occurrences of an element in a sorted array
  3. Ceiling and Floor: The Story of Two Pointers
    1. Ceiling—Smallest element after the Target
    2. Find the Smallest Letter Greater Than the Target
    3. Search Insert Position in a Sorted Array Upper Bound
    4. Floor—largest element Before the Target
    5. Monotonic Function
    6. SQRT(X)—Square Root Estimation—(optimizing around a monotonic function) ⭐
    7. Search Insert Position in a Sorted Array Lower Bound
    8. Time-Based Key-Value Store (Practice) | Solution, Solution too
    9. Minimum Difference between an Element and a value in a Sorted Array
  4. Feasibility and Optimality
    1. KOKO eating Bananas (Medium) + Similar Questions ⭐
    2. Allocate the minimum number of pages + Similar Questions
  5. Rotated Sorted Array
    1. Check if an array is sorted and rotated
    2. Minimum in a Rotated Sorted Array ⭐
    3. Search in Rotated Sorted Array
    4. Minimum in Rotated Sorted Array with Duplicates
    5. Search in Rotated Sorted Array with Duplicates
  6. Searching in a Bitonic Sequence (first strictly increasing then after a point strictly decreasing)
    1. Find peak in a mountain array. ⭐
    2. Find an element in a mountain array. (Practice) | Solution
    3. Find Peak Element in a mountain range array
    4. Find the peak in mountain range II (Practice) | Solution
  7. 2D matrix
    1. Search a 2D Matrix (mapping function)
    2. Search a 2D Matrix II

⭐  Highly recommended

‣
Hidden

Scripts—imported only due to a dependency issue

🍦Binary Search(Vanilla) 🌎Real-life Binary Search🔑Find the First True in a Sorted Boolean Array 🍫Binary search Vanilla to Chocolate🕧First and last occurrence of an Element in a Sorted Array 📏Find the number of occurrences of an element in a sorted array🛖Ceiling(Upper Bound)🎢Floor (Lower Bound) 🧾Find the Smallest Letter Greater Than the Target⬜SQRT(X)—Square Root Estimation🎏Search Insert Position(Sorted Array) Upper Bound⛔First Bad Version (Practice)🎉Find the minimum difference element in a sorted array🐒KOKO eating Bananas 🚌Allocate a minimum number of pages (Hard)🎞️Check if an array is sorted and rotated🧩Monotonic function📉The Minimum in a Rotated Sorted Array🔎Search in Rotated Sorted ArrayMinimum in Rotated Sorted Array with Duplicates Minimum in Rotated Sorted Array with Duplicates Search in Rotated Sorted Array with DuplicatesSearch in Rotated Sorted Array with Duplicates⛰️Find a peak in a mountain array.🚞Find Peak Element in a mountain range array.Search a 2D Matrix (mapping function)Search a 2D Matrix (mapping function)Search a 2D Matrix IISearch a 2D Matrix II📐Understanding Time Complexity of OLog(N): Math + IntuitionFind the First True in a Sorted Boolean Array (Optional Alternate Approach)⁉️Thought Experiment, Does an array need to be sorted to run Binary Search?Search Insert Position(Sorted Array) lower Bound.Search Insert Position(Sorted Array) lower Bound.