SarvamStack

    Binary Search Stories

    23 stories from the epics

    Binary Search Basic

    Mahabharata — Arjuna's Oracle — Finding the Target in a Sorted Army · Easy

    Read →

    Search in Rotated Sorted Array

    Mahabharata — The Rotated Formation — Finding a Specific Warrior After the Army Shifted · Medium

    Read →

    Koko Eating Bananas

    Ramayana — Hanuman's Minimum Speed — The Slowest Pace to Finish Before the Return · Medium

    Read →

    Min Days to Make M Bouquets

    Ramayana — Sita's Garden — The Earliest Day When M Garlands Can Be Woven · Medium

    Read →

    Aggressive Cows

    Mahabharata — The Maximum Safety Distance — Placing Warriors as Far Apart as Possible · Hard

    Read →

    H-Index II

    Mahabharata — Vyasa's Academic Index — Find the Highest Impact Score from Sorted Citations · Medium

    Read →

    Max Candies to K Children

    Ramayana — Sita's Diwali Distribution — Maximum Equal Share for Every Child · Medium

    Read →

    Capacity to Ship Packages in D Days

    Ramayana — Hanuman's Cargo Ship — Minimum Carrying Capacity to Deliver All in D Days · Medium

    Read →

    Book Allocation Problem

    Mahabharata — Vyasa's Fair Distribution — Assign Books to Students Minimizing the Maximum Load · Hard

    Read →

    Split Array Largest Sum

    Mahabharata — Drona's K-Division — Minimizing the Maximum Burden in Any Platoon · Hard

    Read →

    Search 2D Matrix

    Mahabharata — The Tablet of Laws — Finding a Number in the Sacred Grid · Medium

    Read →

    Upper Bound / Ceiling

    Mahabharata — The Minimum Worthy — Finding the Least Warrior Not Below the Standard · Easy

    Read →

    Search 2D Matrix II

    Mahabharata — The Staircase Descent — Navigating a Partially Sorted Grid · Hard

    Read →

    Kth Smallest in Sorted Matrix

    Mahabharata — The Rank of Valor — Finding the kth Least Powerful Warrior in the Grid · Medium

    Read →

    Kth Smallest in Multiplication Table

    Mahabharata — Drona's Rank Table — Finding the kth Entry in the Product Matrix · Hard

    Read →

    Median of Two Sorted Arrays

    Mahabharata — The Perfect Partition — Finding the Exact Balance Point Between Two Armies · Hard

    Read →

    First and Last Position

    Mahabharata — The Front and Rear of the Same Clan — Finding Where a Warrior's Line Begins and Ends · Medium

    Read →

    Count Number of Occurrences

    Mahabharata — The Clan Census — Counting How Many Warriors Share the Same Name · Easy

    Read →

    Search in Infinite Sorted Array

    Mahabharata — The Boundless Formation — Finding a Warrior When the Army Has No Known End · Medium

    Read →

    Peak Index in Mountain

    Mahabharata — The Summit of Meru — Finding the Highest Point in the Sacred Mountain Array · Medium

    Read →

    Find Peak Element

    Mahabharata — Any Local Summit — Finding Any Warrior Taller Than Both Neighbors · Medium

    Read →

    Find Minimum in Rotated Sorted Array

    Mahabharata — The Displaced Formation — Finding the Lowest Warrior After the Army Was Rotated · Medium

    Read →

    Find Number of Rotations

    Mahabharata — The Wheel Count — How Many Times Was the Formation Rotated? · Medium

    Read →