Hard LeetCode Questions

Hard

745 unique questions sorted by company popularity

Top Companies

Questions

TitleCompanies
Trapping Rain Water78
Merge k Sorted Lists53
Sliding Window Maximum48
Median of Two Sorted Arrays47
Text Justification40
Find Median from Data Stream38
Word Ladder37
First Missing Positive35
Minimum Window Substring34
Largest Rectangle in Histogram32
LFU Cache31
Longest Valid Parentheses28
Reverse Nodes in k-Group28
Regular Expression Matching27
Serialize and Deserialize Binary Tree27
Binary Tree Maximum Path Sum25
Integer to English Words25
Candy24
Basic Calculator24
Maximum Profit in Job Scheduling24
Reconstruct Itinerary22
Maximal Rectangle21
Word Search II21
Split Array Largest Sum20
Sudoku Solver18
Wildcard Matching18
Subarrays with K Different Integers17
Alien Dictionary17
Making A Large Island17
Bus Routes17
N-Queens16
Max Points on a Line16
Binary Tree Cameras15
Best Time to Buy and Sell Stock III15
Distinct Subsequences15
Trapping Rain Water II15
Design In-Memory File System15
Number of Visible People in a Queue15
Longest Increasing Path in a Matrix14
Shortest Path in a Grid with Obstacles Elimination14
Word Ladder II14
Word Break II14
The Skyline Problem14
Burst Balloons14
Design Search Autocomplete System14
Basic Calculator III14
Employee Free Time13
Shortest Distance from All Buildings13
Reaching Points13
Design a Text Editor13
Department Top Three Salaries12
Insert Delete GetRandom O(1) - Duplicates allowed12
IPO12
Maximum Frequency Stack12
Collect Coins in a Tree12
Remove Invalid Parentheses11
Optimal Account Balancing11
Minimum Number of Taps to Open to Water a Garden11
Palindrome Partitioning II11
Best Time to Buy and Sell Stock IV11
Russian Doll Envelopes11
Smallest Range Covering Elements from K Lists11
Vertical Order Traversal of a Binary Tree11
Meeting Rooms III11
Count Palindromic Subsequences11
Shortest Palindrome10
Special Binary String10
All O`one Data Structure10
Cherry Pickup10
Substring with Concatenation of All Words10
N-Queens II10
Sliding Window Median10
Max Stack10
Partition Array Into Two Arrays to Minimize Sum Difference10
Count Subarrays With Fixed Bounds10
Minimize Malware Spread10
Remove Boxes10
Minimum Edge Reversals So Every Node Is Reachable10
Reverse Pairs9
Contains Duplicate III9
Design Excel Sum Formula9
Critical Connections in a Network9
Best Meeting Point9
Frog Jump9
Strange Printer9
Guess the Word9
Cherry Pickup II9
Number of Flowers in Full Bloom9
Maximum Performance of a Team9
Rearranging Fruits9
Parallel Courses III8
Parsing A Boolean Expression8
Number of Atoms8
Dungeon Game8
Swim in Rising Water8
Robot Room Cleaner8
Minimum Number of Refueling Stops8
Unique Paths III8
Minimum Cost to Cut a Stick8
Maximum Number of Events That Can Be Attended II8
Put Marbles in Bags8
Minimum Cost to Make at Least One Valid Path in a Grid8
Number of Ways to Form a Target String Given a Dictionary8
Block Placement Queries8
24 Game8
Create Maximum Number7
Palindrome Pairs7
Sliding Puzzle7
Permutation Sequence7
Valid Number7
Patching Array7
Find the Closest Palindrome7
Longest Duplicate Substring7
Minimum Difficulty of a Job Schedule7
Minimum Number of Increments on Subarrays to Form a Target Array7
K-th Smallest in Lexicographical Order7
Minimum Difference in Sums After Removal of Elements7
Zuma Game7
Expression Add Operators7
Number of Islands II7
Consecutive Numbers Sum7
Number of Ways to Paint N × 3 Grid7
Minimum Insertion Steps to Make a String Palindrome6
Divide Nodes Into the Maximum Number of Groups6
Shortest Path to Get All Keys6
Scramble String6
Number of Digit One6
Trips and Users6
Strong Password Checker6
Arithmetic Slices II - Subsequence6
Human Traffic of Stadium6
Shortest Subarray with Sum at Least K6
Super Egg Drop6
Minimum Number of K Consecutive Bit Flips6
Find in Mountain Array6
Maximum Sum BST in Binary Tree6
Minimum Number of Removals to Make Mountain Array6
Find Minimum Time to Finish All Jobs6
Split Message Based on Limit6
Painting the Walls6
Find Servers That Handled Most Number of Requests6
Maximum Sum of 3 Non-Overlapping Subarrays6
Painting a Grid With Three Different Colors6
Maximum Difference Between Even and Odd Frequency II6
Maximum Number of Visible Points6
Trionic Array II6
Delete Duplicate Folders in System6
Set Intersection Size At Least Two6
Maximum Running Time of N Computers6
Split Array With Same Average6
Maximum Number of Points From Grid Queries6
Minimum Cost to Make Array Equal6
Design Skiplist6
Count the Number of Infection Sequences6
Minimum Window Subsequence5
Count of Smaller Numbers After Self5
Concatenated Words5
Stickers to Spell Word5
Range Module5
Count Different Palindromic Subsequences5
Serialize and Deserialize N-ary Tree5
Race Car5
Sum of Distances in Tree5
Similar String Groups5
Recover a Tree From Preorder Traversal5
Last Substring in Lexicographical Order5
Maximum Score Words Formed by Letters5
Longest Happy Prefix5
Max Dot Product of Two Subsequences5
String Compression II5
Maximum Employees to Be Invited to a Meeting5
Replace Non-Coprime Numbers in Array5
Longest Path With Different Adjacent Characters5
Minimum Cost Walk in Weighted Graph5
Find Building Where Alice and Bob Can Meet5
Minimum Number of Moves to Make Palindrome5
Max Chunks To Make Sorted II5
Length of Longest V-Shaped Diagonal Segment5
Count Subarrays With Score Less Than K5
Maximum Number of Tasks You Can Assign5
Count the Number of Arrays with K Matching Adjacent Elements5
Kth Smallest Product of Two Sorted Arrays5
Find the Original Typed String II5
Maximize Subarrays After Removing One Conflicting Pair5
Maximum Fruits Harvested After at Most K Steps5
Sort Items by Groups Respecting Dependencies5
Non-negative Integers without Consecutive Ones5
Read N Characters Given read4 II - Call Multiple Times5
Maximum Path Quality of a Graph5
Check If It Is a Good Array5
Sum of k-Mirror Numbers5
Minimum One Bit Operations to Make Integers Zero5
Kth Smallest Number in Multiplication Table5
Minimum Replacements to Sort the Array5
Count the Number of Powerful Integers5
Get the Maximum Score5
Maximum Number of Non-overlapping Palindrome Substrings5
Threshold Majority Queries4
Parse Lisp Expression4
Maximum Candies You Can Get from Boxes4

Showing 200 of 745 questions