Binary Search
Everything on SkillVeris tagged Binary Search — collected across the glossary, study notes, blog, and cheat sheets.
14 resources across 2 libraries
Study Notes(1)
Interview Questions(13)
What is Big O Notation?
Big O notation describes how an algorithm’s running time or memory usage grows as the input size grows, focusing on the dominant term and ignoring constant fac…
What is Binary Search?
Binary search is an algorithm that finds a target value in a sorted collection by repeatedly halving the search range, comparing the target to the middle eleme…
How Do You Find the Longest Increasing Subsequence?
The longest increasing subsequence (LIS) is the longest subsequence of an array in which elements strictly increase, solvable in O(n^2) with straightforward dy…
What is the Divide and Conquer Strategy?
Divide and conquer is an algorithm design strategy that breaks a problem into smaller independent subproblems of the same type, solves each subproblem recursiv…
How Do You Find the Median of Two Sorted Arrays?
The median of two sorted arrays can be found in O(log(min(m, n))) time by binary searching a partition point on the smaller array, choosing a matching partitio…
How Do You Search in a Rotated Sorted Array?
Searching a rotated sorted array for a target in O(log n) works by running a modified binary search: at each step, determine which half (left or right of mid)…
How Do You Find a Peak Element in an Array?
A peak element — one strictly greater than both its neighbors, with -infinity assumed beyond the array's edges — can be found in O(log n) using binary search:…
What is Binary Search on the Answer?
Binary search on the answer is a technique where, instead of searching for a value inside a sorted array, you binary search over the range of possible ANSWERS…
What is Exponential Search?
Exponential search finds a target in a sorted array by first doubling an index (1, 2, 4, 8, ...) until it finds a range that must contain the target, then runn…
What is Interpolation Search?
Interpolation search finds a target in a sorted, uniformly distributed numeric array by estimating the target's likely position using linear interpolation of i…
What is Jump Search?
Jump search finds a target in a sorted array by jumping forward in fixed-size blocks of size √n until it finds a block that could contain the target, then doin…
How Do You Construct a Suffix Array?
A suffix array is built by generating every suffix of a string, sorting those suffixes lexicographically, and storing only their starting indices, which naive…
What is the Egg Drop Problem?
The egg drop problem asks for the minimum number of trial drops needed, in the worst case, to find the exact floor in an n-floor building at which eggs start b…