Hard LeetCode Questions

Hard

745 unique questions sorted by company popularity

Top Companies

Questions

TitleCompanies
Trapping Rain Water80
Median of Two Sorted Arrays52
Sliding Window Maximum50
Merge k Sorted Lists46
Text Justification41
Word Ladder39
Find Median from Data Stream37
Minimum Window Substring36
First Missing Positive34
Reverse Nodes in k-Group30
LFU Cache30
Largest Rectangle in Histogram29
Regular Expression Matching28
Binary Tree Maximum Path Sum27
Basic Calculator25
Word Search II24
Candy23
Longest Valid Parentheses23
Serialize and Deserialize Binary Tree22
Maximum Profit in Job Scheduling20
Alien Dictionary20
Sudoku Solver20
Reconstruct Itinerary19
Split Array Largest Sum19
Integer to English Words19
Bus Routes19
Wildcard Matching19
Word Break II17
Making A Large Island16
Maximal Rectangle16
Max Points on a Line15
Best Time to Buy and Sell Stock III15
N-Queens14
Longest Increasing Path in a Matrix14
Trapping Rain Water II14
Number of Visible People in a Queue14
Design In-Memory File System14
Reaching Points14
Binary Tree Cameras13
Shortest Path in a Grid with Obstacles Elimination13
Vertical Order Traversal of a Binary Tree13
Frog Jump13
Burst Balloons13
Word Ladder II13
The Skyline Problem13
Basic Calculator III13
Shortest Distance from All Buildings13
Minimum Number of Taps to Open to Water a Garden12
All O`one Data Structure12
Subarrays with K Different Integers12
Sliding Window Median12
Department Top Three Salaries11
Insert Delete GetRandom O(1) - Duplicates allowed11
Distinct Subsequences11
Special Binary String10
Employee Free Time10
Russian Doll Envelopes10
Substring with Concatenation of All Words10
Maximum Frequency Stack10
Design Search Autocomplete System10
Optimal Account Balancing9
Number of Atoms9
Number of Islands II9
Meeting Rooms III9
Minimum Edge Reversals So Every Node Is Reachable9
Smallest Range Covering Elements from K Lists9
Partition Array Into Two Arrays to Minimize Sum Difference9
N-Queens II9
Max Stack9
Best Time to Buy and Sell Stock IV9
Design a Text Editor9
Count Palindromic Subsequences9
Remove Boxes9
Minimize Malware Spread9
Number of Ways to Form a Target String Given a Dictionary9
Parallel Courses III8
Design Excel Sum Formula8
Cherry Pickup8
Palindrome Partitioning II8
IPO8
Remove Invalid Parentheses8
Guess the Word8
Best Meeting Point8
Collect Coins in a Tree8
Block Placement Queries8
Consecutive Numbers Sum7
Critical Connections in a Network7
Minimum Cost to Cut a Stick7
Minimum Number of Refueling Stops7
Valid Number7
Rearranging Fruits7
Minimum Cost to Make Array Equal7
Count Subarrays With Fixed Bounds7
Swim in Rising Water7
Maximum Performance of a Team7
Robot Room Cleaner7
Find Servers That Handled Most Number of Requests7
Minimum Cost to Make at Least One Valid Path in a Grid7
Expression Add Operators7
Design Skiplist7
Shortest Palindrome6
Create Maximum Number6
Shortest Path to Get All Keys6
Parsing A Boolean Expression6
Palindrome Pairs6
Reverse Pairs6
Dungeon Game6
Permutation Sequence6
Unique Paths III6
Put Marbles in Bags6
Scramble String6
Find the Closest Palindrome6
Longest Duplicate Substring6
Maximum Number of Events That Can Be Attended II6
K-th Smallest in Lexicographical Order6
Maximum Number of Tasks You Can Assign6
Strange Printer6
Split Message Based on Limit6
Delete Duplicate Folders in System6
Maximum Number of Visible Points6
Maximum Number of Points From Grid Queries6
24 Game6
Minimum One Bit Operations to Make Integers Zero6
Number of Flowers in Full Bloom6
Minimum Replacements to Sort the Array6
Minimum Insertion Steps to Make a String Palindrome5
Sliding Puzzle5
Contains Duplicate III5
Cherry Pickup II5
Find K-th Smallest Pair Distance5
Serialize and Deserialize N-ary Tree5
Minimum Difficulty of a Job Schedule5
Find Minimum Time to Finish All Jobs5
Human Traffic of Stadium5
Escape the Spreading Fire5
Strong Password Checker5
Maximum Difference Between Even and Odd Frequency II5
Sum of Distances in Tree5
Number of Submatrices That Sum to Target5
Longest Path With Different Adjacent Characters5
Zuma Game5
Painting the Walls5
Word Abbreviation5
Maximum Path Quality of a Graph5
Divide Nodes Into the Maximum Number of Groups4
Parse Lisp Expression4
Maximum Candies You Can Get from Boxes4
Minimum Cost to Reach Destination in Time4
Minimum Window Subsequence4
Minimum Initial Energy to Finish Tasks4
Allocate Mailboxes4
Maximum Score From Grid Operations4
Robot Collisions4
Recover a Tree From Preorder Traversal4
Count Subarrays With Median K4
Divide an Array Into Subarrays With Minimum Cost II4
Longest Happy Prefix4
Count of Range Sum4
Number of Digit One4
Minimum Difference in Sums After Removal of Elements4
Length of Longest V-Shaped Diagonal Segment4
Shortest Subarray with Sum at Least K4
Find in Mountain Array4
Trips and Users4
Kth Smallest Product of Two Sorted Arrays4
Maximize Subarrays After Removing One Conflicting Pair4
Maximum Sum of 3 Non-Overlapping Subarrays4
Sum of Prefix Scores of Strings4
Set Intersection Size At Least Two4
Minimum Number of Increments on Subarrays to Form a Target Array4
Rearrange String k Distance Apart4
Arithmetic Slices II - Subsequence4
Minimum Number of Removals to Make Mountain Array4
Maximum Employees to Be Invited to a Meeting4
Find Maximum Non-decreasing Array Length4
Maximum Score Words Formed by Letters4
Max Chunks To Make Sorted II4
Maximum Running Time of N Computers4
Number of Ways to Paint N × 3 Grid4
Range Module4
Super Egg Drop4
Minimum Number of Days to Disconnect Island4
Time Taken to Cross the Door4
Replace Non-Coprime Numbers in Array4
Longest Cycle in a Graph4
Minimum Cost Walk in Weighted Graph4
Valid Arrangement of Pairs4
Count Different Palindromic Subsequences4
Count the Number of Inversions4
Subarray With Elements Greater Than Varying Threshold4
Count the Number of Arrays with K Matching Adjacent Elements4
Painting a Grid With Three Different Colors4
Split Array With Same Average4
Tallest Billboard4
String Compression II4
Sort Items by Groups Respecting Dependencies4
Maximum Building Height4
Similar String Groups4
Non-negative Integers without Consecutive Ones4
Reachable Nodes In Subdivided Graph4

Showing 200 of 745 questions