Binary Search & Modified BS
FundamentalsLogarithmic O(log N) search on sorted spaces, monotonic predicates, and answers
303 problems·32 Easy·172 Medium·99 Hard
Pattern Study Guide & Cheat Sheet▼
Halve the search space at each step over any monotonically ordered sequence or decision boundary (FF...FTTT...T).
Core Invariant: The predicate `feasible(mid)` divides the range into two halves: [False, ..., False, True, ..., True]. Binary search pinpoints the exact boundary where the transition occurs.
Recognize it (Keywords & Signals)
- Search target in sorted or rotated sorted array in O(log n)
- Find first or last occurrence of an element in a duplicated sorted array
- Find minimum or maximum value satisfying a condition (Binary Search on Answer)
- Keywords: "minimize the maximum", "maximize the minimum", "capacity to ship", "eating speed"
When NOT to use
Search space is neither sorted nor monotonic (the feasibility predicate does not stay True once satisfied).
How to solve (Step-by-step)
- 1.Define search boundaries: `low` = minimum possible answer, `high` = maximum possible answer.
- 2.In a `while low <= high` loop: calculate `mid = low + (high - low) // 2`.
- 3.Evaluate feasibility: `can_achieve(mid)`.
- 4.For minimization: if feasible, record `ans = mid` and search smaller values `high = mid - 1`; else `low = mid + 1`.
- 5.For maximization: if feasible, record `ans = mid` and search larger values `low = mid + 1`; else `high = mid - 1`.
- 6.Return recorded `ans`.
Watch for (Interview Traps)
- Infinite loop from improper midpoint update: avoid `low = mid` without `+ 1` in `while low <= high`
- Setting `low` too small in answer search (e.g. `low = 0` when individual items cannot fit)
- Integer overflow in non-Python languages: use `low + (high - low) // 2` instead of `(low + high) // 2`
Binary Search on Answer (Minimize Feasible Value)
def binary_search_on_answer(weights: list[int], days: int) -> int:
def can_ship(capacity: int) -> bool:
needed_days = 1
curr_load = 0
for w in weights:
if curr_load + w > capacity:
needed_days += 1
curr_load = 0
curr_load += w
return needed_days <= days
# Boundaries: minimum single package and total package weight
low, high = max(weights), sum(weights)
best = high
while low <= high:
mid = low + (high - low) // 2
if can_ship(mid):
best = mid # Capacity works, try to find smaller
high = mid - 1
else:
low = mid + 1 # Capacity too small, must increase
return best- Cost
- O(log(range) * O(check)) · O(1) auxiliary space (Logarithmic iterations guarantee extremely fast convergence (< 32 iterations for 10^9).)
Canonical problems
#704 Binary Search: Canonical search for value in sorted array
#33 Search in Rotated Sorted Array: One half is always sorted; check if target falls inside it
#875 Koko Eating Bananas: Search eating speed in range [1, max(piles)]
#1011 Capacity To Ship Packages Within D Days: Search minimum ship capacity in range [max(w), sum(w)]
⌘K
Medium·38 companies·Max freq 100%·Acc 50.0%
ConfluentCockroach LabsAxon+35
Medium·29 companies·Max freq 100%·Acc 49.3%
TinkoffInstacartSplunk+26
Medium·24 companies·Max freq 90%·Acc 64.6%
NianticNeetCode 150NeetCode 150+21
Hard·23 companies·Max freq 100%·Acc 54.8%
Pony.aiPony.aiAirbnb+20
Medium·23 companies·Max freq 100%·Acc 54.3%
Wissen TechnologyNeetCode 150NeetCode 150+20
Medium·23 companies·Max freq 88%·Acc 36.0%
WixNeetCode 150NeetCode 150+20
Medium·22 companies·Max freq 100%·Acc 54.7%
YatraSquarepoint CapitalSamsung+19
Medium·21 companies·Max freq 100%·Acc 74.3%
Apollo.ioApollo.ioDP world+18
Medium·21 companies·Max freq 91%·Acc 55.0%
NeetCode 150NeetCode 150Ola Cabs+18
Medium·19 companies·Max freq 100%·Acc 65.2%
Squarepoint CapitalUBSDoorDash+16
Medium·14 companies·Max freq 100%·Acc 70.9%
XXNeetCode 150+11
Medium·13 companies·Max freq 100%·Acc 66.3%
CleverTapExpediaPayPal+10
Medium·12 companies·Max freq 100%·Acc 45.0%
Pony.aiPony.aiUrban Company+9
Medium·10 companies·Max freq 100%·Acc 66.9%
ZenefitsLyftSalesforce+7
Medium·10 companies·Max freq 57%·Acc 66.8%
QualcommAmazonBloomberg+7
Medium·10 companies·Max freq 50%·Acc 40.2%
BloombergWalmart LabsAmazon+7
Hard·9 companies·Max freq 100%·Acc 23.9%
ArcesiumSamsungTexas Instruments+6
Medium·9 companies·Max freq 100%·Acc 52.6%
McDonaldsQualcommSalesforce+6
Medium·9 companies·Max freq 97%·Acc 51.4%
razorpayTekionDE Shaw+6
Medium·9 companies·Max freq 90%·Acc 56.8%
PhonePeFlipkartBarclays+6
Easy·9 companies·Max freq 75%·Acc 75.8%
AirbnbAccentureAmazon+6
Medium·9 companies·Max freq 75%·Acc 72.4%
RobloxFlipkartAmazon+6
Hard·8 companies·Max freq 100%·Acc 32.9%
DevRevPhonePeGoldman Sachs+5
Medium·8 companies·Max freq 87%·Acc 37.9%
SIGVisaRoblox+5
Medium·7 companies·Max freq 88%·Acc 45.1%
CitadelPhonePeAmazon+4
Medium·7 companies·Max freq 88%·Acc 51.5%
CitadelNetflixPalantir+4
Medium·7 companies·Max freq 68%·Acc 49.7%
PayPayGoldman SachsAmazon+4
Easy·7 companies·Max freq 63%·Acc 59.4%
LinkedIntcsGoogle+4
Medium·7 companies·Max freq 63%·Acc 73.5%
AndurilMicrosoftAmazon+4
Hard·7 companies·Max freq 63%·Acc 0.5%
UberJuspaytcs+4
Medium·6 companies·Max freq 100%·Acc 50.1%
SnapdealTuringMicrosoft+3
Medium·6 companies·Max freq 100%·Acc 30.3%
GrouponMathWorksGoldman Sachs+3
Hard·6 companies·Max freq 100%·Acc 56.4%
Deutsche BankCapital OneGoogle+3
Medium·6 companies·Max freq 100%·Acc 51.0%
NaviZeta GlobalGoogle+3
Medium·6 companies·Max freq 100%·Acc 0.6%
SiemensAmazonGoogle+3
Medium·6 companies·Max freq 88%·Acc 0.4%
DisneyTikTokIBM+3
Easy·6 companies·Max freq 63%·Acc 79.7%
Arista NetworksAmazonMeta+3
Easy·6 companies·Max freq 63%·Acc 87.8%
Josh TechnologyMetaAmazon+3
Hard·6 companies·Max freq 41%·Acc 54.8%
PayPalMicrosoftBloomberg+3
Medium·6 companies·Max freq 38%·Acc 49.1%
InfosysGoogleMeta+3
Medium·6 companies·Max freq 38%·Acc 84.4%
AmazonSalesforceMeta+3
Hard·6 companies·Max freq 38%·Acc 43.8%
InfosysGoogleBloomberg+3
Medium·6 companies·Max freq 38%·Acc 49.9%
GoogleOracleAmazon+3
#3152Special Array II
Medium·5 companies·Max freq 100%·Acc 0.5%
National Payments Corporation of IndiaNational Payments Corporation of IndiaAmazon+2
Medium·5 companies·Max freq 100%·Acc 51.8%
ZenefitsExpediaSalesforce+2
Medium·5 companies·Max freq 100%·Acc 41.1%
PalantirSamsaraBloomberg+2
Hard·5 companies·Max freq 88%·Acc 50.0%
Walmart LabsAmazonMeta+2
Hard·5 companies·Max freq 77%·Acc 62.2%
PinterestGoogleMicrosoft+2
Hard·5 companies·Max freq 75%·Acc 52.4%
InfosysMetaAmazon+2
Easy·5 companies·Max freq 75%·Acc 72.0%
ZeptoUberBloomberg+2
Hard·5 companies·Max freq 63%·Acc 48.7%
LinkedInBloombergMicrosoft+2
Hard·5 companies·Max freq 60%·Acc 0.5%
NeetCode 150NeetCode 150Google+2
Medium·5 companies·Max freq 38%·Acc 70.7%
GoogleBloombergMeta+2
Hard·5 companies·Max freq 25%·Acc 46.7%
Goldman SachsMicrosoftGoogle+2
Medium·5 companies·Max freq 25%·Acc 61.9%
AmazonBloombergGoogle+2
Easy·5 companies·Max freq 25%·Acc 0.7%
GoogleBloombergAmazon+2
Medium·4 companies·Max freq 100%·Acc 0.5%
AlphonsoSnowflakeDE Shaw+1
Medium·4 companies·Max freq 100%·Acc 65.4%
IMCFractal AnalyticsGoogle+1
Medium·4 companies·Max freq 100%·Acc 70.2%
ArcesiumMetaAmazon+1
Medium·4 companies·Max freq 100%·Acc 62.0%
razorpayPostmatesAmazon+1
Medium·4 companies·Max freq 100%·Acc 68.4%
PhonePeAmazonBloomberg+1
Hard·4 companies·Max freq 100%·Acc 61.5%
TeradataAmazonGoogle+1
Hard·4 companies·Max freq 88%·Acc 0.7%
Walmart LabsBloombergGoogle+1
Medium·4 companies·Max freq 76%·Acc 51.5%
SalesforceBloombergAmazon+1
Hard·4 companies·Max freq 65%·Acc 48.0%
InfosysAmazonMicrosoft+1
Medium·4 companies·Max freq 64%·Acc 65.6%
MetaTikTokAmazon+1
Medium·4 companies·Max freq 63%·Acc 43.7%
SalesforceAppleMicrosoft+1
Medium·4 companies·Max freq 55%·Acc 47.9%
SalesforceAmazonMeta+1
Medium·4 companies·Max freq 29%·Acc 40.2%
GoogleMetaAmazon+1
Medium·4 companies·Max freq 25%·Acc 53.1%
AmazonMetaMicrosoft+1
Easy·4 companies·Max freq 16%·Acc 73.0%
AmazonBloombergMeta+1
Medium·3 companies·Max freq 100%·Acc 34.4%
RobinhoodTekionGoogle
Hard·3 companies·Max freq 100%·Acc 28.2%
PhonePePalantirGoogle
Hard·3 companies·Max freq 100%·Acc 39.4%
Deutsche BankPhonePeGoogle
Medium·3 companies·Max freq 92%·Acc 36.1%
LTIMindtreeGoogleAmazon
Medium·3 companies·Max freq 88%·Acc 38.4%
Palo Alto NetworksMathWorksMicrosoft
Hard·3 companies·Max freq 75%·Acc 40.5%
DE ShawIBMApple
Medium·3 companies·Max freq 38%·Acc 61.8%
GoogleMetaMicrosoft
Medium·3 companies·Max freq 38%·Acc 37.8%
AmazonMetaGoogle
Medium·3 companies·Max freq 28%·Acc 58.5%
GoogleMetaAmazon
Medium·3 companies·Max freq 28%·Acc 63.8%
UberGoogleMicrosoft
Hard·3 companies·Max freq 25%·Acc 53.9%
GoogleAmazonBloomberg
Hard·3 companies·Max freq 25%·Acc 45.7%
GoogleBloombergAmazon
Medium·3 companies·Max freq 13%·Acc 58.3%
MetaAmazonGoogle
Hard·3 companies·Max freq 13%·Acc 66.2%
AmazonMicrosoftGoogle
Hard·3 companies·Max freq 11%·Acc 0.6%
GoogleBloombergAmazon
Hard·2 companies·Max freq 100%·Acc 42.1%
Akuna CapitalGoogle
Hard·2 companies·Max freq 95%·Acc 31.8%
SprinklrAmazon
Medium·2 companies·Max freq 76%·Acc 68.0%
PayPalBloomberg
Hard·2 companies·Max freq 75%·Acc 0.4%
SalesforceArista Networks
Hard·2 companies·Max freq 75%·Acc 20.8%
SalesforceGoogle
Medium·2 companies·Max freq 63%·Acc 39.3%
RubrikGoogle
Easy·2 companies·Max freq 50%·Acc 56.8%
AppleMicrosoft
Hard·2 companies·Max freq 25%·Acc 33.7%
LinkedInAmazon
Hard·2 companies·Max freq 25%·Acc 62.5%
MetaAmazon
Medium·2 companies·Max freq 25%·Acc 70.1%
TikTokGoogle
Medium·2 companies·Max freq 16%·Acc 64.3%
GoogleAmazon
Hard·2 companies·Max freq 13%·Acc 51.1%
BloombergGoogle
Medium·2 companies·Max freq 13%·Acc 61.3%
MicrosoftGoogle
Hard·1 companies·Max freq 100%·Acc 47.4%
American Express
Medium·1 companies·Max freq 100%·Acc 68.7%
Deutsche Bank
Hard·1 companies·Max freq 88%·Acc 62.5%
Morgan Stanley
Medium·1 companies·Max freq 75%·Acc 50.1%
DE Shaw
Medium·1 companies·Max freq 75%·Acc 35.0%
PayPal
Easy·1 companies·Max freq 63%·Acc 59.9%
Salesforce
Medium·1 companies·Max freq 63%·Acc 56.5%
Salesforce
Medium·1 companies·Max freq 25%·Acc 55.9%
Amazon
Medium·1 companies·Max freq 25%·Acc 36.9%
Google
Medium·1 companies·Max freq 25%·Acc 63.5%
Google
Medium·1 companies·Max freq 13%·Acc 53.2%
Google
# | Problem | Difficulty | Top Companies↓ | Frequency | Acceptance | |
|---|---|---|---|---|---|---|
| #33 | Search in Rotated Sorted Array ArrayBinary Search | Medium | 100% | 45.2% | ||
| #875 | Koko Eating Bananas ArrayBinary Search | Medium | 100% | 50.2% | ||
| #4 | Median of Two Sorted Arrays ArrayBinary SearchDivide and Conquer | Hard | 100% | 47.0% | ||
| #981 | Time Based Key-Value Store Hash TableStringBinary SearchDesign | Medium | 100% | 50.0% | ||
| #162 | Find Peak Element ArrayBinary Search | Medium | 89% | 47.1% | ||
| #34 | Find First and Last Position of Element in Sorted Array ArrayBinary Search | Medium | 100% | 49.3% | ||
| #362 | Design Hit Counter ArrayBinary SearchDesignQueueData Stream | Medium | 100% | 69.7% | ||
| #528 | Random Pick with Weight ArrayMathBinary SearchPrefix SumRandomized | Medium | 100% | 49.2% | ||
| #287 | Find the Duplicate Number ArrayTwo PointersBinary SearchBit ManipulationPigeonhole PrincipleFloyd's Cycle Finding Algorithm | Medium | 90% | 64.6% | ||
| #1235 | Maximum Profit in Job Scheduling ArrayBinary SearchDynamic ProgrammingSorting | Hard | 100% | 54.8% | ||
| #74 | Search a 2D Matrix ArrayBinary SearchMatrix | Medium | 100% | 54.3% | ||
| #98 | Validate Binary Search Tree TreeDepth-First SearchBinary Search TreeBinary Tree | Medium | 88% | 36.0% | ||
| #410 | Split Array Largest Sum ArrayBinary SearchDynamic ProgrammingGreedyPrefix Sum | Hard | 100% | 60.9% | ||
| #713 | Subarray Product Less Than K ArrayBinary SearchSliding WindowPrefix Sum | Medium | 100% | 54.7% | ||
| #1004 | Max Consecutive Ones III ArrayBinary SearchSliding WindowPrefix Sum | Medium | 88% | 68.0% | ||
| #1011 | Capacity To Ship Packages Within D Days ArrayBinary Search | Medium | 100% | 74.3% | ||
| #153 | Find Minimum in Rotated Sorted Array ArrayBinary Search | Medium | 91% | 55.0% | ||
| #268 | Missing Number ArrayHash TableMathBinary SearchBit ManipulationSorting | Easy | 78% | 72.3% | ||
| #1146 | Snapshot Array ArrayHash TableBinary SearchDesignPersistent Data Structure | Medium | 100% | 36.8% | ||
| #658 | Find K Closest Elements ArrayTwo PointersBinary SearchSliding WindowSortingHeap (Priority Queue) | Medium | 88% | 49.9% | ||
| #1268 | Search Suggestions System ArrayStringBinary SearchTrieSortingHeap (Priority Queue) | Medium | 100% | 65.2% | ||
| #209 | Minimum Size Subarray Sum ArrayBinary SearchSliding WindowPrefix Sum | Medium | 88% | 52.2% | ||
| #69 | Sqrt(x) MathBinary SearchNewton's Method | Easy | 78% | 42.1% | ||
| #240 | Search a 2D Matrix II ArrayBinary SearchDivide and ConquerMatrix | Medium | 88% | 57.6% | ||
| #704 | Binary Search ArrayBinary Search | Easy | 92% | 0.6% | ||
| #235 | Medium | 100% | 70.9% | |||
| #1283 | Find the Smallest Divisor Given a Threshold ArrayBinary Search | Medium | 100% | 66.3% | ||
| #378 | Kth Smallest Element in a Sorted Matrix ArrayBinary SearchSortingHeap (Priority Queue)Matrix | Medium | 100% | 64.8% | ||
| #1838 | Frequency of the Most Frequent Element ArrayBinary SearchGreedySliding WindowSortingPrefix Sum | Medium | 100% | 45.0% | ||
| #3161 | Block Placement Queries ArrayBinary SearchBinary Indexed TreeSegment TreeOrdered Set | Hard | 90% | 41.4% | ||
| #475 | Heaters ArrayTwo PointersBinary SearchSorting | Medium | 78% | 42.2% | ||
| #35 | Search Insert Position ArrayBinary Search | Easy | 76% | 51.7% | ||
| #729 | My Calendar I ArrayBinary SearchDesignSegment TreeOrdered Set | Medium | 75% | 58.3% | ||
| #96 | Unique Binary Search Trees MathDynamic ProgrammingTreeBinary Search TreeBinary Tree | Medium | 88% | 63.9% | ||
| #778 | Swim in Rising Water ArrayBinary SearchDepth-First SearchBreadth-First SearchUnion-FindMinimaxHeap (Priority Queue)MatrixDijkstra's Algorithm | Hard | 78% | 68.0% | ||
| #109 | Convert Sorted List to Binary Search Tree Linked ListDivide and ConquerTreeBinary Search TreeBinary Tree | Medium | 100% | 66.9% | ||
| #852 | Peak Index in a Mountain Array ArrayBinary SearchTernary Search | Medium | 57% | 66.8% | ||
| #81 | Search in Rotated Sorted Array II ArrayBinary Search | Medium | 50% | 40.2% | ||
| #611 | Valid Triangle Number ArrayTwo PointersBinary SearchGreedySorting | Medium | 100% | 57.0% | ||
| #2035 | Partition Array Into Two Arrays to Minimize Sum Difference ArrayTwo PointersBinary SearchDynamic ProgrammingBit ManipulationMeet in the MiddleSortingOrdered SetBitmask | Hard | 100% | 23.9% | ||
| #792 | Number of Matching Subsequences ArrayHash TableStringBinary SearchDynamic ProgrammingTrieSorting | Medium | 100% | 50.6% | ||
| #2563 | Count the Number of Fair Pairs ArrayTwo PointersBinary SearchSorting | Medium | 100% | 52.6% | ||
| #1574 | Shortest Subarray to be Removed to Make Array Sorted ArrayTwo PointersBinary SearchStackMonotonic Stack | Medium | 97% | 51.4% | ||
| #1482 | Minimum Number of Days to Make m Bouquets ArrayBinary Search | Medium | 90% | 56.8% | ||
| #350 | Intersection of Two Arrays II ArrayHash TableTwo PointersBinary SearchSorting | Easy | 88% | 60.1% | ||
| #493 | Reverse Pairs ArrayBinary SearchDivide and ConquerBinary Indexed TreeSegment TreeMerge SortOrdered SetTreap | Hard | 77% | 34.7% | ||
| #108 | Convert Sorted Array to Binary Search Tree ArrayDivide and ConquerTreeBinary Search TreeBinary Tree | Easy | 75% | 75.8% | ||
| #1552 | Magnetic Force Between Two Balls ArrayBinary SearchSorting | Medium | 75% | 72.4% | ||
| #1539 | Kth Missing Positive Number ArrayBinary Search | Easy | 69% | 63.7% | ||
| #1631 | Path With Minimum Effort ArrayBinary SearchDepth-First SearchBreadth-First SearchUnion-FindHeap (Priority Queue)MatrixDijkstra's Algorithm | Medium | 67% | 63.6% | ||
| #99 | Medium | 53% | 60.2% | |||
| #862 | Shortest Subarray with Sum at Least K ArrayBinary SearchQueueSliding WindowHeap (Priority Queue)Prefix SumMonotonic Queue | Hard | 100% | 32.9% | ||
| #2008 | Maximum Earnings From Taxi ArrayHash TableBinary SearchDynamic ProgrammingSorting | Medium | 100% | 46.6% | ||
| #754 | Reach a Number MathBinary Search | Medium | 100% | 45.3% | ||
| #270 | Closest Binary Search Tree Value Binary SearchTreeDepth-First SearchBinary Search TreeBinary Tree | Easy | 88% | 49.2% | ||
| #1760 | Minimum Limit of Balls in a Bag ArrayBinary Search | Medium | 88% | 66.1% | ||
| #2817 | Minimum Absolute Difference Between Elements With Constraint ArrayBinary SearchOrdered Set | Medium | 87% | 37.9% | ||
| #367 | Valid Perfect Square MathBinary Search | Easy | 63% | 45.1% | ||
| #173 | Binary Search Tree Iterator StackTreeDesignBinary Search TreeBinary TreeIterator | Medium | 63% | 76.7% | ||
| #400 | Nth Digit MathBinary Search | Medium | 63% | 38.5% | ||
| #2812 | Find the Safest Path in a Grid ArrayBinary SearchBreadth-First SearchUnion-FindHeap (Priority Queue)Matrix | Medium | 62% | 57.2% | ||
| #456 | 132 Pattern ArrayBinary SearchStackMonotonic StackOrdered Set | Medium | 54% | 34.9% | ||
| #532 | K-diff Pairs in an Array ArrayHash TableTwo PointersBinary SearchSorting | Medium | 54% | 46.1% | ||
| #1901 | Find a Peak Element II ArrayBinary SearchMatrix | Medium | 100% | 55.3% | ||
| #2560 | House Robber IV ArrayBinary SearchDynamic ProgrammingGreedy | Medium | 100% | 64.6% | ||
| #888 | Fair Candy Swap ArrayHash TableBinary SearchSorting | Easy | 100% | 65.3% | ||
| #374 | Guess Number Higher or Lower Binary SearchInteractive | Easy | 93% | 57.9% | ||
| #3186 | Maximum Total Damage With Spell Casting ArrayHash TableTwo PointersBinary SearchDynamic ProgrammingSortingCounting | Medium | 88% | 45.1% | ||
| #718 | Maximum Length of Repeated Subarray ArrayBinary SearchDynamic ProgrammingSliding WindowRolling HashHash Function | Medium | 88% | 51.5% | ||
| #1044 | Longest Duplicate Substring StringBinary SearchSliding WindowRolling HashSuffix ArrayHash FunctionSuffix AutomatonSuffix TreeZ AlgorithmBoyer–Moore String-Search Algorithm | Hard | 88% | 31.3% | ||
| #222 | Count Complete Tree Nodes Binary SearchBit ManipulationTreeBinary Tree | Medium | 68% | 73.1% | ||
| #2300 | Successful Pairs of Spells and Potions ArrayTwo PointersBinary SearchSorting | Medium | 68% | 49.7% | ||
| #278 | First Bad Version Binary SearchInteractive | Easy | 63% | 47.3% | ||
| #744 | Find Smallest Letter Greater Than Target ArrayBinary Search | Easy | 63% | 59.4% | ||
| #701 | Insert into a Binary Search Tree TreeBinary Search TreeBinary Tree | Medium | 63% | 73.5% | ||
| #259 | 3Sum Smaller ArrayTwo PointersBinary SearchSorting | Medium | 63% | 51.4% | ||
| #2009 | Minimum Number of Operations to Make Array Continuous ArrayHash TableBinary SearchSliding Window | Hard | 63% | 0.5% | ||
| #1027 | Longest Arithmetic Subsequence ArrayHash TableBinary SearchDynamic Programming | Medium | 100% | 50.1% | ||
| #1648 | Sell Diminishing-Valued Colored Balls ArrayMathBinary SearchGreedySortingHeap (Priority Queue) | Medium | 100% | 30.3% | ||
| #2141 | Maximum Running Time of N Computers ArrayBinary SearchGreedySorting | Hard | 100% | 56.4% | ||
| #2616 | Minimize the Maximum Difference of Pairs ArrayBinary SearchDynamic ProgrammingGreedySorting | Medium | 100% | 51.0% | ||
| #441 | Arranging Coins MathBinary Search | Easy | 100% | 48.4% | ||
| #1488 | Avoid Flood in The City ArrayHash TableBinary SearchGreedyHeap (Priority Queue) | Medium | 100% | 39.0% | ||
| #2064 | Minimized Maximum of Products Distributed to Any Store ArrayBinary SearchGreedy | Medium | 100% | 0.6% | ||
| #1802 | Maximum Value at a Given Index in a Bounded Array MathBinary SearchGreedy | Medium | 88% | 0.4% | ||
| #2594 | Minimum Time to Repair Cars ArrayBinary Search | Medium | 77% | 59.5% | ||
| #2448 | Minimum Cost to Make Array Equal ArrayBinary SearchGreedySortingPrefix Sum | Hard | 75% | 46.8% | ||
| #1351 | Count Negative Numbers in a Sorted Matrix ArrayBinary SearchMatrix | Easy | 63% | 79.7% | ||
| #2824 | Count Pairs Whose Sum is Less than Target ArrayTwo PointersBinary SearchSorting | Easy | 63% | 87.8% | ||
| #327 | Count of Range Sum ArrayBinary SearchDivide and ConquerBinary Indexed TreeSegment TreeMerge SortOrdered SetTreap | Hard | 53% | 39.3% | ||
| #633 | Sum of Square Numbers MathTwo PointersBinary Search | Medium | 50% | 36.9% | ||
| #1671 | Minimum Number of Removals to Make Mountain Array ArrayBinary SearchDynamic ProgrammingGreedy | Hard | 41% | 54.8% | ||
| #1498 | Number of Subsequences That Satisfy the Given Sum Condition ArrayTwo PointersBinary SearchSorting | Medium | 38% | 49.1% | ||
| #1008 | Construct Binary Search Tree from Preorder Traversal ArrayStackTreeBinary Search TreeMonotonic StackBinary Tree | Medium | 38% | 84.4% | ||
| #315 | Count of Smaller Numbers After Self ArrayBinary SearchDivide and ConquerBinary Indexed TreeSegment TreeMerge SortOrdered SetTreap | Hard | 38% | 43.8% | ||
| #2226 | Maximum Candies Allocated to K Children ArrayBinary Search | Medium | 38% | 49.9% | ||
| #1095 | Find in Mountain Array ArrayBinary SearchInteractiveTernary Search | Hard | 38% | 41.9% | ||
| #700 | Search in a Binary Search Tree TreeBinary Search TreeBinary Tree | Easy | 25% | 82.9% | ||
| #3477 | Fruits Into Baskets II ArrayBinary SearchSegment TreeSimulationOrdered Set | Easy | 100% | 70.3% | ||
| #826 | Most Profit Assigning Work ArrayTwo PointersBinary SearchGreedySorting | Medium | 100% | 56.3% | ||
| #2861 | Maximum Number of Alloys ArrayBinary Search | Medium | 100% | 41.3% | ||
| #2439 | Minimize Maximum of Array ArrayBinary SearchDynamic ProgrammingGreedyPrefix Sum | Medium | 100% | 46.6% | ||
| #3152 | Special Array II ArrayBinary SearchPrefix Sum | Medium | 100% | 0.5% | ||
| #255 | Verify Preorder Sequence in Binary Search Tree ArrayStackTreeBinary Search TreeRecursionMonotonic StackBinary Tree | Medium | 100% | 51.8% | ||
| #3006 | Find Beautiful Indices in the Given Array I Two PointersStringBinary SearchRolling HashString MatchingHash FunctionZ AlgorithmKnuth–Morris–Pratt AlgorithmBoyer–Moore String-Search Algorithm | Medium | 100% | 41.1% | ||
| #2071 | Maximum Number of Tasks You Can Assign ArrayTwo PointersBinary SearchGreedyQueueSortingMonotonic Queue | Hard | 88% | 50.0% | ||
| #2302 | Count Subarrays With Score Less Than K ArrayBinary SearchSliding WindowPrefix Sum | Hard | 77% | 62.2% | ||
| #2940 | Find Building Where Alice and Bob Can Meet ArrayBinary SearchStackBinary Indexed TreeSegment TreeHeap (Priority Queue)Monotonic Stack | Hard | 75% | 52.4% | ||
| #2187 | Minimum Time to Complete Trips ArrayBinary Search | Medium | 75% | 39.8% | ||
| #1385 | Find the Distance Value Between Two Arrays ArrayTwo PointersBinary SearchSorting | Easy | 75% | 72.0% | ||
| #2258 | Escape the Spreading Fire ArrayBinary SearchBreadth-First SearchMatrix | Hard | 68% | 0.4% | ||
| #2040 | Kth Smallest Product of Two Sorted Arrays ArrayBinary Search | Hard | 63% | 48.7% | ||
| #1851 | Minimum Interval to Include Each Query IntervalsArrayBinary SearchSweep LineSortingHeap (Priority Queue) | Hard | 60% | 0.5% | ||
| #887 | Super Egg Drop MathBinary SearchDynamic Programming | Hard | 50% | 30.6% | ||
| #3356 | Zero Array Transformation II ArrayTwo PointersBinary SearchPrefix Sum | Medium | 39% | 43.6% | ||
| #1382 | Balance a Binary Search Tree Divide and ConquerGreedyTreeDepth-First SearchBinary Search TreeBinary Tree | Medium | 38% | 86.3% | ||
| #3532 | Path Existence Queries in a Graph I ArrayHash TableBinary SearchUnion-FindGraph Theory | Medium | 38% | 70.7% | ||
| #1346 | Check If N and Its Double Exist ArrayHash TableTwo PointersBinary SearchSorting | Easy | 30% | 41.9% | ||
| #95 | Unique Binary Search Trees II Dynamic ProgrammingBacktrackingTreeBinary Search TreeBinary Tree | Medium | 28% | 62.8% | ||
| #154 | Find Minimum in Rotated Sorted Array II ArrayBinary Search | Hard | 25% | 46.7% | ||
| #2411 | Smallest Subarrays With Maximum Bitwise OR ArrayBinary SearchBit ManipulationSliding Window | Medium | 25% | 61.9% | ||
| #1337 | The K Weakest Rows in a Matrix ArrayBinary SearchSortingHeap (Priority Queue)Matrix | Easy | 25% | 74.4% | ||
| #1608 | Special Array With X Elements Greater Than or Equal X ArrayBinary SearchSorting | Easy | 25% | 0.7% | ||
| #719 | Find K-th Smallest Pair Distance ArrayTwo PointersBinary SearchSorting | Hard | 25% | 46.7% | ||
| #1898 | Maximum Number of Removable Characters ArrayTwo PointersStringBinary Search | Medium | 100% | 0.5% | ||
| #1292 | Maximum Side Length of a Square with Sum Less than or Equal to Threshold ArrayBinary SearchMatrixPrefix Sum | Medium | 100% | 65.4% | ||
| #2024 | Maximize the Confusion of an Exam StringBinary SearchSliding WindowPrefix Sum | Medium | 100% | 70.2% | ||
| #2070 | Most Beautiful Item for Each Query ArrayBinary SearchSorting | Medium | 100% | 62.0% | ||
| #2517 | Maximum Tastiness of Candy Basket ArrayBinary SearchGreedySorting | Medium | 100% | 68.4% | ||
| #2528 | Maximize the Minimum Powered City ArrayBinary SearchGreedyQueueSliding WindowPrefix Sum | Hard | 100% | 61.5% | ||
| #2179 | Count Good Triplets in an Array ArrayBinary SearchDivide and ConquerBinary Indexed TreeSegment TreeMerge SortOrdered Set | Hard | 88% | 0.7% | ||
| #1062 | Longest Repeating Substring StringBinary SearchDynamic ProgrammingRolling HashSuffix ArrayHash FunctionSuffix AutomatonSuffix Tree | Medium | 80% | 63.5% | ||
| #3636 | Threshold Majority Queries ArrayHash TableBinary SearchDivide and ConquerCountingPrefix Sum | Hard | 78% | 22.4% | ||
| #3488 | Closest Equal Element Queries ArrayHash TableBinary Search | Medium | 76% | 51.5% | ||
| #3508 | Implement Router ArrayHash TableBinary SearchDesignQueueOrdered Set | Medium | 75% | 39.0% | ||
| #3661 | Maximum Walls Destroyed by Robots ArrayBinary SearchDynamic ProgrammingSorting | Hard | 65% | 48.0% | ||
| #483 | Smallest Good Base MathBinary Search | Hard | 65% | 0.5% | ||
| #426 | Convert Binary Search Tree to Sorted Doubly Linked List Linked ListStackTreeDepth-First SearchBinary Search TreeBinary TreeDoubly-Linked List | Medium | 64% | 65.6% | ||
| #3613 | Minimize Maximum Component Cost Binary SearchUnion-FindGraph TheorySorting | Medium | 63% | 43.7% | ||
| #3634 | Minimum Removals to Balance Array ArrayBinary SearchSliding WindowSorting | Medium | 55% | 47.9% | ||
| #1060 | Missing Element in Sorted Array ArrayBinary Search | Medium | 50% | 59.7% | ||
| #3453 | Separate Squares I ArrayBinary Search | Medium | 50% | 58.0% | ||
| #902 | Numbers At Most N Given Digit Set ArrayMathStringBinary SearchDynamic Programming | Hard | 50% | 45.6% | ||
| #669 | Trim a Binary Search Tree TreeDepth-First SearchBinary Search TreeBinary Tree | Medium | 42% | 66.8% | ||
| #1970 | Last Day Where You Can Still Cross ArrayBinary SearchDepth-First SearchBreadth-First SearchUnion-FindMatrix | Hard | 41% | 68.7% | ||
| #3346 | Maximum Frequency of an Element After Performing Operations I ArrayBinary SearchSliding WindowSortingPrefix Sum | Medium | 29% | 40.2% | ||
| #1483 | Kth Ancestor of a Tree Node Binary SearchDynamic ProgrammingBit ManipulationTreeDepth-First SearchBreadth-First SearchDesignBinary Lifting | Hard | 27% | 38.9% | ||
| #501 | Find Mode in Binary Search Tree TreeDepth-First SearchBinary Search TreeBinary Tree | Easy | 25% | 59.1% | ||
| #2501 | Longest Square Streak in an Array ArrayHash TableBinary SearchDynamic ProgrammingSorting | Medium | 25% | 53.1% | ||
| #2389 | Longest Subsequence With Limited Sum ArrayBinary SearchGreedySortingPrefix Sum | Easy | 25% | 73.7% | ||
| #2601 | Prime Subtraction Operation ArrayMathBinary SearchGreedyNumber Theory | Medium | 25% | 55.6% | ||
| #436 | Find Right Interval ArrayBinary SearchSorting | Medium | 25% | 56.1% | ||
| #3633 | Earliest Finish Time for Land and Water Rides I ArrayTwo PointersBinary SearchGreedySorting | Easy | 16% | 73.0% | ||
| #3534 | Path Existence Queries in a Graph II ArrayTwo PointersBinary SearchDynamic ProgrammingGreedyBit ManipulationGraph TheorySorting | Hard | 15% | 64.6% | ||
| #3479 | Fruits Into Baskets III ArrayBinary SearchSegment TreeOrdered Set | Medium | 15% | 39.4% | ||
| #1712 | Ways to Split Array Into Three Subarrays ArrayTwo PointersBinary SearchPrefix Sum | Medium | 100% | 34.4% | ||
| #1889 | Minimum Space Wasted From Packaging ArrayBinary SearchSortingPrefix Sum | Hard | 100% | 33.7% | ||
| #2080 | Range Frequency Queries ArrayHash TableBinary SearchDesignSegment Tree | Medium | 100% | 43.6% | ||
| #3008 | Find Beautiful Indices in the Given Array II Two PointersStringBinary SearchRolling HashString MatchingHash FunctionZ AlgorithmKnuth–Morris–Pratt AlgorithmBoyer–Moore String-Search Algorithm | Hard | 100% | 28.2% | ||
| #2968 | Apply Operations to Maximize Frequency Score ArrayBinary SearchSliding WindowSortingPrefix Sum | Hard | 100% | 39.4% | ||
| #2271 | Maximum White Tiles Covered by a Carpet ArrayBinary SearchGreedySliding WindowSortingPrefix Sum | Medium | 92% | 36.1% | ||
| #2831 | Find the Longest Equal Subarray ArrayHash TableBinary SearchSliding Window | Medium | 88% | 38.4% | ||
| #1055 | Shortest Way to Form String Two PointersStringBinary SearchGreedy | Medium | 88% | 61.7% | ||
| #2055 | Plates Between Candles ArrayStringBinary SearchPrefix Sum | Medium | 88% | 47.6% | ||
| #2972 | Count the Number of Incremovable Subarrays II ArrayTwo PointersBinary Search | Hard | 75% | 40.5% | ||
| #1428 | Leftmost Column with at Least a One ArrayBinary SearchMatrixInteractive | Medium | 75% | 55.3% | ||
| #1102 | Path With Maximum Minimum Value ArrayBinary SearchDepth-First SearchBreadth-First SearchUnion-FindHeap (Priority Queue)MatrixDijkstra's Algorithm | Medium | 68% | 54.7% | ||
| #272 | Closest Binary Search Tree Value II Two PointersStackTreeDepth-First SearchBinary Search TreeHeap (Priority Queue)Binary Tree | Hard | 63% | 61.2% | ||
| #1038 | Binary Search Tree to Greater Sum Tree TreeDepth-First SearchBinary Search TreeBinary Tree | Medium | 56% | 88.4% | ||
| #825 | Friends Of Appropriate Ages ArrayTwo PointersBinary SearchSorting | Medium | 51% | 49.9% | ||
| #2333 | Minimum Sum of Squared Difference ArrayBinary SearchGreedySortingHeap (Priority Queue) | Medium | 50% | 26.9% | ||
| #710 | Random Pick with Blacklist ArrayHash TableMathBinary SearchSortingRandomized | Hard | 50% | 35.2% | ||
| #2981 | Find Longest Special Substring That Occurs Thrice I Hash TableStringBinary SearchSliding WindowCounting | Medium | 38% | 61.8% | ||
| #2250 | Count Number of Rectangles Containing Each Point ArrayHash TableBinary SearchBinary Indexed TreeSorting | Medium | 38% | 37.8% | ||
| #2332 | The Latest Time to Catch a Bus ArrayTwo PointersBinary SearchSorting | Medium | 38% | 30.1% | ||
| #911 | Online Election ArrayHash TableBinary SearchDesign | Medium | 38% | 53.0% | ||
| #2540 | Minimum Common Value ArrayHash TableTwo PointersBinary Search | Easy | 38% | 60.8% | ||
| #731 | My Calendar II ArrayBinary SearchDesignSegment TreePrefix SumOrdered Set | Medium | 30% | 63.3% | ||
| #2779 | Maximum Beauty of an Array After Applying Operation ArrayBinary SearchSliding WindowSorting | Medium | 28% | 58.5% | ||
| #1966 | Binary Searchable Numbers in an Unsorted Array ArrayBinary SearchStackMonotonic Stack | Medium | 28% | 63.8% | ||
| #878 | Nth Magical Number MathBinary SearchLeast Common MultipleInclusion-Exclusion Principle | Hard | 25% | 36.9% | ||
| #2426 | Number of Pairs Satisfying Inequality ArrayBinary SearchDivide and ConquerBinary Indexed TreeSegment TreeMerge SortOrdered Set | Hard | 25% | 47.6% | ||
| #2089 | Find Target Indices After Sorting Array ArrayBinary SearchSorting | Easy | 25% | 78.2% | ||
| #3347 | Maximum Frequency of an Element After Performing Operations II ArrayBinary SearchSliding WindowSortingPrefix Sum | Hard | 25% | 53.9% | ||
| #2498 | Frog Jump II ArrayBinary SearchGreedy | Medium | 25% | 62.4% | ||
| #363 | Max Sum of Rectangle No Larger Than K ArrayBinary SearchMatrixPrefix SumOrdered Set | Hard | 25% | 45.7% | ||
| #3312 | Sorted GCD Pair Queries ArrayHash TableMathBinary SearchCombinatoricsCountingNumber TheoryPrefix SumEuclidean AlgorithmGreatest Common Divisor | Hard | 16% | 0.6% | ||
| #3296 | Minimum Number of Seconds to Make Mountain Height Zero ArrayMathBinary SearchGreedyHeap (Priority Queue) | Medium | 13% | 58.3% | ||
| #3600 | Maximize Spanning Tree Stability with Upgrades Binary SearchGreedyUnion-FindGraph TheoryMinimum Spanning Tree | Hard | 13% | 66.2% | ||
| #3501 | Maximize Active Section with Trade II ArrayStringBinary SearchSegment Tree | Hard | 11% | 0.6% | ||
| #1649 | Create Sorted Array through Instructions ArrayBinary SearchDivide and ConquerBinary Indexed TreeSegment TreeMerge SortOrdered Set | Hard | 100% | 42.1% | ||
| #1885 | Count Pairs in Two Arrays ArrayTwo PointersBinary SearchSorting | Medium | 100% | 60.3% | ||
| #3414 | Maximum Score of Non-overlapping Intervals ArrayBinary SearchDynamic ProgrammingSorting | Hard | 95% | 31.8% | ||
| #3710 | Maximum Partition Factor ArrayBinary SearchDepth-First SearchBreadth-First SearchUnion-FindGraph Theory | Hard | 93% | 32.1% | ||
| #3709 | Design Exam Scores Tracker ArrayBinary SearchDesignPrefix Sum | Medium | 92% | 0.4% | ||
| #3049 | Earliest Second to Mark Indices II ArrayBinary SearchGreedyHeap (Priority Queue) | Hard | 88% | 22.7% | ||
| #2659 | Make Array Empty ArrayBinary SearchGreedyBinary Indexed TreeSegment TreeSortingOrdered Set | Hard | 88% | 27.2% | ||
| #2554 | Maximum Number of Integers to Choose From a Range I ArrayHash TableBinary SearchGreedySorting | Medium | 76% | 68.0% | ||
| #3399 | Smallest Substring With Identical Characters II StringBinary Search | Hard | 75% | 0.4% | ||
| #3398 | Smallest Substring With Identical Characters I ArrayBinary SearchEnumeration | Hard | 75% | 20.8% | ||
| #2398 | Maximum Number of Robots Within Budget ArrayBinary SearchQueueSliding WindowHeap (Priority Queue)Prefix SumMonotonic Queue | Hard | 67% | 38.8% | ||
| #2982 | Find Longest Special Substring That Occurs Thrice II Hash TableStringBinary SearchSliding WindowCounting | Medium | 63% | 39.3% | ||
| #3608 | Minimum Time for K Connected Components Binary SearchUnion-FindGraph TheorySorting | Medium | 54% | 45.7% | ||
| #2970 | Count the Number of Incremovable Subarrays I ArrayTwo PointersBinary SearchEnumeration | Easy | 50% | 56.8% | ||
| #3281 | Maximize Score of Numbers in Ranges ArrayBinary SearchGreedySorting | Medium | 50% | 35.9% | ||
| #3733 | Minimum Time to Complete All Deliveries MathBinary Search | Medium | 50% | 35.5% | ||
| #3413 | Maximum Coins From K Consecutive Bags ArrayBinary SearchGreedySliding WindowSortingPrefix Sum | Medium | 47% | 25.7% | ||
| #1891 | Cutting Ribbons ArrayBinary Search | Medium | 38% | 53.1% | ||
| #497 | Random Point in Non-overlapping Rectangles ArrayMathBinary SearchReservoir SamplingPrefix SumOrdered SetRandomized | Medium | 28% | 40.1% | ||
| #3134 | Find the Median of the Uniqueness Array ArrayHash TableBinary SearchSliding Window | Hard | 27% | 30.5% | ||
| #1213 | Intersection of Three Sorted Arrays ArrayHash TableBinary SearchCounting | Easy | 27% | 80.0% | ||
| #275 | H-Index II ArrayBinary Search | Medium | 25% | 39.8% | ||
| #1870 | Minimum Speed to Arrive on Time ArrayBinary Search | Medium | 25% | 48.0% | ||
| #3113 | Find the Number of Subarrays Where Boundary Elements Are Maximum ArrayBinary SearchStackMonotonic Stack | Hard | 25% | 33.7% | ||
| #1439 | Find the Kth Smallest Sum of a Matrix With Sorted Rows ArrayBinary SearchHeap (Priority Queue)Matrix | Hard | 25% | 62.5% | ||
| #1305 | All Elements in Two Binary Search Trees TreeDepth-First SearchBinary Search TreeSortingBinary Tree | Medium | 25% | 80.3% | ||
| #1237 | Find Positive Integer Solution for a Given Equation MathTwo PointersBinary SearchInteractive | Medium | 25% | 70.1% | ||
| #3814 | Maximum Capacity Within Budget ArrayTwo PointersBinary SearchSorting | Medium | 25% | 20.6% | ||
| #3454 | Separate Squares II ArrayBinary SearchSegment TreeSweep Line | Hard | 25% | 59.3% | ||
| #1713 | Minimum Operations to Make a Subsequence ArrayHash TableBinary SearchGreedyLongest Increasing Subsequence | Hard | 25% | 49.9% | ||
| #774 | Minimize Max Distance to Gas Station ArrayBinary Search | Hard | 25% | 54.0% | ||
| #1231 | Divide Chocolate ArrayBinary Search | Hard | 25% | 0.6% | ||
| #1300 | Sum of Mutated Array Closest to Target ArrayBinary SearchSorting | Medium | 25% | 46.5% | ||
| #1793 | Maximum Score of a Good Subarray ArrayTwo PointersBinary SearchStackMonotonic StackCartesian Tree | Hard | 25% | 64.2% | ||
| #3419 | Minimize the Maximum Edge Weight of Graph Binary SearchDepth-First SearchBreadth-First SearchGraph TheoryShortest Path | Medium | 25% | 45.1% | ||
| #3635 | Earliest Finish Time for Land and Water Rides II ArrayTwo PointersBinary SearchGreedySorting | Medium | 16% | 64.3% | ||
| #3932 | Count K-th Roots in a Range MathBinary Search | Medium | 13% | 24.5% | ||
| #3620 | Network Recovery Pathways ArrayBinary SearchDynamic ProgrammingGraph TheoryTopological SortHeap (Priority Queue)Shortest Path | Hard | 13% | 50.9% | ||
| #352 | Data Stream as Disjoint Intervals Hash TableBinary SearchUnion-FindDesignData StreamOrdered Set | Hard | 13% | 60.3% | ||
| #3464 | Maximize the Distance Between Points on a Square ArrayMathBinary SearchGeometrySorting | Hard | 13% | 51.1% | ||
| #1855 | Maximum Distance Between a Pair of Values ArrayTwo PointersBinary Search | Medium | 13% | 61.3% | ||
| #1157 | Online Majority Element In Subarray ArrayBinary SearchDesignBinary Indexed TreeSegment TreeSqrt DecompositionBoyer–Moore Majority Vote Algorithm | Hard | 100% | 40.6% | ||
| #3143 | Maximum Points Inside the Square ArrayHash TableStringBinary SearchSorting | Medium | 100% | 39.8% | ||
| #2826 | Sorting Three Groups ArrayBinary SearchDynamic Programming | Medium | 100% | 43.2% | ||
| #1521 | Find a Value of a Mysterious Function Closest to Target ArrayBinary SearchBit ManipulationSegment TreeSparse Table | Hard | 100% | 47.4% | ||
| #2838 | Maximum Coins Heroes Can Collect ArrayTwo PointersBinary SearchSortingPrefix Sum | Medium | 100% | 68.8% | ||
| #2137 | Pour Water Between Buckets to Make Water Levels Equal ArrayBinary Search | Medium | 100% | 68.7% | ||
| #3766 | Minimum Operations to Make Binary Palindrome ArrayTwo PointersBinary SearchBit Manipulation | Medium | 100% | 52.2% | ||
| #3048 | Earliest Second to Mark Indices I ArrayBinary Search | Medium | 88% | 37.2% | ||
| #2604 | Minimum Time to Eat All Grains ArrayTwo PointersBinary SearchSorting | Hard | 88% | 40.9% | ||
| #1964 | Find the Longest Valid Obstacle Course at Each Position ArrayBinary SearchBinary Indexed TreeLongest Increasing Subsequence | Hard | 88% | 62.5% | ||
| #2702 | Minimum Operations to Make Numbers Non-positive ArrayBinary Search | Hard | 88% | 44.2% | ||
| #793 | Preimage Size of Factorial Zeroes Function MathBinary Search | Hard | 88% | 47.2% | ||
| #3155 | Maximum Number of Upgradable Servers ArrayMathBinary Search | Medium | 75% | 43.8% | ||
| #3323 | Minimize Connected Groups by Inserting Interval ArrayBinary SearchSliding WindowSorting | Medium | 75% | 50.1% | ||
| #3209 | Number of Subarrays With AND Value of K ArrayBinary SearchBit ManipulationSegment Tree | Hard | 75% | 35.6% | ||
| #2387 | Median of a Row Wise Sorted Matrix ArrayBinary SearchMatrix | Medium | 75% | 71.3% | ||
| #2234 | Maximum Total Beauty of the Gardens ArrayTwo PointersBinary SearchGreedySortingEnumerationPrefix Sum | Hard | 75% | 30.2% | ||
| #2557 | Maximum Number of Integers to Choose From a Range II ArrayBinary SearchGreedySorting | Medium | 75% | 35.0% | ||
| #2856 | Minimum Array Length After Pair Removals ArrayHash TableTwo PointersBinary SearchGreedyCounting | Medium | 75% | 27.8% | ||
| #3971 | Maximum Total Value ArrayMathBinary SearchGreedy | Hard | 65% | 30.3% | ||
| #3145 | Find Products of Elements of Big Array ArrayBinary SearchBit Manipulation | Hard | 65% | 25.1% | ||
| #1150 | Check If a Number Is Majority Element in a Sorted Array ArrayBinary Search | Easy | 63% | 59.9% | ||
| #3171 | Find Subarray With Bitwise OR Closest to K ArrayBinary SearchBit ManipulationSegment Tree | Hard | 63% | 31.4% | ||
| #3135 | Equalize Strings by Adding or Removing Characters at Ends StringBinary SearchDynamic ProgrammingSliding WindowHash Function | Medium | 63% | 56.5% | ||
| #2565 | Subsequence With the Minimum Score Two PointersStringBinary Search | Hard | 51% | 33.5% | ||
| #1064 | Fixed Point ArrayBinary Search | Easy | 50% | 64.3% | ||
| #1818 | Minimum Absolute Sum Difference ArrayBinary SearchSortingOrdered Set | Medium | 50% | 32.6% | ||
| #2555 | Maximize Win From Two Segments ArrayBinary SearchSliding Window | Medium | 50% | 38.0% | ||
| #2790 | Maximum Number of Groups With Increasing Length ArrayMathBinary SearchGreedySorting | Hard | 38% | 23.3% | ||
| #3920 | Maximize Fixed Points After Deletions ArrayBinary SearchSorting | Hard | 27% | 19.7% | ||
| #1586 | Binary Search Tree Iterator II StackTreeDesignBinary Search TreeBinary TreeIterator | Medium | 25% | 63.5% | ||
| #3369 | Design an Array Statistics Tracker Hash TableBinary SearchDesignQueueHeap (Priority Queue)Data StreamOrdered Set | Hard | 25% | 35.7% | ||
| #1099 | Two Sum Less Than K ArrayTwo PointersBinary SearchSorting | Easy | 25% | 62.1% | ||
| #1214 | Two Sum BSTs Two PointersBinary SearchStackTreeDepth-First SearchBinary Search TreeBinary Tree | Medium | 25% | 68.2% | ||
| #1923 | Longest Common Subpath ArrayBinary SearchRolling HashSuffix ArrayHash FunctionSuffix AutomatonSuffix Tree | Hard | 25% | 30.0% | ||
| #2830 | Maximize the Profit as the Salesman ArrayHash TableBinary SearchDynamic ProgrammingSorting | Medium | 25% | 38.5% | ||
| #3455 | Shortest Matching Substring Two PointersStringBinary SearchString Matching | Hard | 25% | 24.6% | ||
| #3605 | Minimum Stability Factor of Array ArrayMathBinary SearchGreedySegment TreeNumber Theory | Hard | 25% | 20.8% | ||
| #1533 | Find the Index of the Large Integer ArrayBinary SearchInteractive | Medium | 25% | 56.6% | ||
| #1847 | Closest Room ArrayBinary SearchSortingOrdered Set | Hard | 25% | 41.5% | ||
| #3639 | Minimum Time to Activate String ArrayBinary Search | Medium | 25% | 49.3% | ||
| #1954 | Minimum Garden Perimeter to Collect Enough Apples MathBinary Search | Medium | 25% | 55.9% | ||
| #1782 | Count Pairs Of Nodes ArrayHash TableTwo PointersBinary SearchGraph TheorySortingCounting | Hard | 25% | 42.9% | ||
| #2111 | Minimum Operations to Make the Array K-Increasing ArrayBinary SearchLongest Increasing Subsequence | Hard | 25% | 40.8% | ||
| #2223 | Sum of Scores of Built Strings StringBinary SearchRolling HashSuffix ArrayString MatchingHash FunctionZ AlgorithmKnuth–Morris–Pratt Algorithm | Hard | 25% | 49.9% | ||
| #2519 | Count the Number of K-Big Indices ArrayBinary SearchDivide and ConquerBinary Indexed TreeSegment TreeMerge SortOrdered Set | Hard | 25% | 53.7% | ||
| #2926 | Maximum Balanced Subsequence Sum ArrayBinary SearchDynamic ProgrammingBinary Indexed TreeSegment Tree | Hard | 25% | 26.2% | ||
| #3350 | Adjacent Increasing Subarrays Detection II ArrayBinary Search | Medium | 25% | 58.9% | ||
| #2476 | Closest Nodes Queries in a Binary Search Tree ArrayBinary SearchTreeDepth-First SearchBinary Search TreeBinary Tree | Medium | 25% | 44.7% | ||
| #302 | Smallest Rectangle Enclosing Black Pixels ArrayBinary SearchDepth-First SearchBreadth-First SearchMatrix | Hard | 25% | 61.0% | ||
| #732 | My Calendar III Binary SearchDesignSegment TreePrefix SumOrdered Set | Hard | 25% | 72.0% | ||
| #702 | Search in a Sorted Array of Unknown Size ArrayBinary SearchInteractive | Medium | 25% | 73.1% | ||
| #2424 | Longest Uploaded Prefix Hash TableBinary SearchUnion-FindDesignBinary Indexed TreeSegment TreeHeap (Priority Queue)Ordered Set | Medium | 25% | 55.2% | ||
| #1477 | Find Two Non-overlapping Sub-arrays Each With Target Sum ArrayHash TableBinary SearchDynamic ProgrammingSliding Window | Medium | 25% | 36.9% | ||
| #1918 | Kth Smallest Subarray Sum ArrayBinary SearchSliding Window | Medium | 25% | 53.4% | ||
| #2031 | Count Subarrays With More Ones Than Zeros ArrayHash TableBinary SearchDivide and ConquerBinary Indexed TreeSegment TreeMerge SortOrdered Set | Medium | 25% | 49.6% | ||
| #644 | Maximum Average Subarray II ArrayBinary SearchPrefix Sum | Hard | 25% | 37.8% | ||
| #1182 | Shortest Distance to Target Color ArrayBinary SearchDynamic Programming | Medium | 25% | 56.5% | ||
| #1170 | Compare Strings by Frequency of the Smallest Character ArrayHash TableStringBinary SearchSorting | Medium | 25% | 63.5% | ||
| #1618 | Maximum Font to Fit a Sentence in a Screen ArrayStringBinary SearchInteractive | Medium | 25% | 62.1% | ||
| #1562 | Find Latest Group of Size M ArrayHash TableBinary SearchSimulation | Medium | 25% | 44.0% | ||
| #2286 | Booking Concert Tickets in Groups Binary SearchDesignBinary Indexed TreeSegment Tree | Hard | 25% | 19.9% | ||
| #2936 | Number of Equal Numbers Blocks ArrayBinary SearchInteractive | Medium | 25% | 62.5% | ||
| #2967 | Minimum Cost to Make Array Equalindromic ArrayMathBinary SearchGreedySorting | Medium | 25% | 23.6% | ||
| #3117 | Minimum Sum of Values by Dividing Array ArrayBinary SearchDynamic ProgrammingBit ManipulationSegment TreeQueue | Hard | 25% | 27.9% | ||
| #2454 | Next Greater Element IV ArrayBinary SearchStackSortingHeap (Priority Queue)Monotonic Stack | Hard | 13% | 42.3% | ||
| #3357 | Minimize the Maximum Adjacent Element Difference ArrayBinary SearchGreedy | Hard | 13% | 19.9% | ||
| #2513 | Minimize the Maximum of Two Arrays MathBinary SearchNumber TheoryLeast Common MultipleInclusion-Exclusion Principle | Medium | 13% | 32.5% | ||
| #3585 | Find Weighted Median Node in Tree ArrayBinary SearchDynamic ProgrammingBit ManipulationTreeDepth-First Search | Hard | 13% | 26.2% | ||
| #3896 | Minimum Operations to Transform Array into Alternating Prime ArrayMathTwo PointersBinary SearchSortingNumber Theory | Medium | 13% | 53.2% | ||
| #2589 | Minimum Time to Complete All Tasks ArrayBinary SearchStackGreedySorting | Hard | 13% | 40.1% | ||
| #3824 | Minimum K to Reduce Array Within Limit ArrayBinary Search | Medium | 13% | 41.0% |
Showing 303 of 303 problems in Binary Search & Modified BSFiltered: All Companies