Binary Search Interview Questions [2026-2027]
245+ real questions from verified interview reports across 12 companies.
Sourced from 1Point3Acres, Blind, Glassdoor, Reddit, and more. Translated and cleaned.
Top Companies Asking Binary Search Questions
Sample Binary Search Questions
They automatically give everyone OA. I applied for both frontend and backend and received OA for both within 3 days. I will go over the questions for both positions. Spoiler Alert:...
public static int minimumNumberOfPages(List<Integer> pages, int days) { \tint max_page_day = Integer.MIN_VALUE; \tfor(int i = 0; i < pages.sizes(); i++) \t{ \t\tif(max_page_day < pages.get(i)) \t\t{ \t\t\tmax_page_day = pages.get(i); \t\t} \t} \tint low = 1; \tint high = max_page_day; \t \tint current_days = 0; \tint...
1.https://www.fastprep.io/problems/find-minimum-pages-per-day 2.https://www.reddit.com/r/leetcode/comments/1besxh0/bombed_second_q_in_amazon_oa/
Time Series class Write a time series class that stores and accesses double values based on time_t. The class should be capable of storing up to the most recent 5000 seconds of data. You should provid
**Round 1 Interview Structure** * **Resume Discussion:** 15 minutes. * **Data Structures and Algorithms:** 45 minutes. **Problem Statements** 1. **Split Array Largest Sum:** Given an array of integers
Q1. Given an array of size n with integers in it. And given two numbers a and b, find the minimum possible score of ELIGIBLE sub-arrays of the given array. i)...
Assume, there is a Data store which stores documents, where each document has a field, documentDate, of string type in the format YYYYMMDDhhmmss. Assume there is an Api, GetDocumentsCount(string datePrefix), which...
LeetCode #2817: Minimum Absolute Difference Between Elements With Constraint. Difficulty: Medium. Topics: Array, Binary Search, Ordered Set. Asked at Capital One in the last 6 months.
LeetCode #2141: Maximum Running Time of N Computers. Difficulty: Hard. Topics: Array, Binary Search, Greedy, Sorting. Asked at Capital One in the last 6 months.
LeetCode #658: Find K Closest Elements. Difficulty: Medium. Topics: Array, Two Pointers, Binary Search, Sliding Window, Sorting, Heap (Priority Queue). Asked at Yandex in the last 6 months.
LeetCode #33: Search in Rotated Sorted Array. Difficulty: Medium. Topics: Array, Binary Search. Asked at Yandex in the last 6 months.
LeetCode #528: Random Pick with Weight. Difficulty: Medium. Topics: Array, Math, Binary Search, Prefix Sum, Randomized. Asked at Two Sigma in the last 6 months.
LeetCode #1011: Capacity To Ship Packages Within D Days. Difficulty: Medium. Topics: Array, Binary Search. Asked at Agoda in the last 6 months.
LeetCode #1648: Sell Diminishing-Valued Colored Balls. Difficulty: Medium. Topics: Array, Math, Binary Search, Greedy, Sorting, Heap (Priority Queue). Asked at MathWorks in the last 6 months.
LeetCode #1889: Minimum Space Wasted From Packaging. Difficulty: Hard. Topics: Array, Binary Search, Sorting, Prefix Sum. Asked at IMC in the last 6 months.
LeetCode #981: Time Based Key-Value Store. Difficulty: Medium. Topics: Hash Table, String, Binary Search, Design. Asked at Gusto in the last 6 months.
LeetCode #2563: Count the Number of Fair Pairs. Difficulty: Medium. Topics: Array, Two Pointers, Binary Search, Sorting. Asked at McDonalds in the last 6 months.
LeetCode #981: Time Based Key-Value Store. Difficulty: Medium. Topics: Hash Table, String, Binary Search, Design. Asked at Compass in the last 6 months.
LeetCode #1283: Find the Smallest Divisor Given a Threshold. Difficulty: Medium. Topics: Array, Binary Search. Asked at CleverTap in the last 6 months.
LeetCode #3477: Fruits Into Baskets II. Difficulty: Easy. Topics: Array, Binary Search, Segment Tree, Simulation, Ordered Set. Asked at Udemy in the last 6 months.
LeetCode #4: Median of Two Sorted Arrays. Difficulty: Hard. Topics: Array, Binary Search, Divide and Conquer. Asked at Udemy in the last 6 months.
#1146 Snapshot Array
LeetCode #1146: Snapshot Array. Difficulty: Medium. Topics: Array, Hash Table, Binary Search, Design. Asked at DeepMind in the last 6 months.
LeetCode #981: Time Based Key-Value Store. Difficulty: Medium. Topics: Hash Table, String, Binary Search, Design. Asked at Cockroach Labs in the last 6 months.
## Problem Given n versions where the first bad version causes all subsequent ones to be bad, find the first bad version using binary search. ## Likely LeetCode equivalent Directly matches First Bad Version (LC 278). ## Tags binary_search, whatnot
## Problem Guess a secret number or value using binary search or interactive API calls to minimize guesses. ## Likely LeetCode equivalent No direct unambiguous match. ## Tags binary_search, math
See All 245 Binary Search Questions
Full question text, interview context, and company-specific frequency data for subscribers.
Get Access