#Hard
80 posts
LintCode 971 Surplus Value Backpack - Hard
971. Surplus Value Backpack
LintCode 89 K Sum - Hard
89. k Sum
LintCode 841 String Replace - Hard
841. String Replace
LintCode 816 Traveling Salesman Problem - Hard
816. Traveling Salesman Problem
LintCode 396 Coin In Line III - Hard
有 n 个硬币排成一条线, 第 i 枚硬币的价值为 values[i].
LintCode 249 Count Smaller Number Before Itself - Hard
Description
LintCode 183 Wood Cut - Hard
183. Wood Cut
LintCode 120 Word Ladder - Hard
120. Word Ladder
LeetCode 97 Interleaving String - Hard
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.
LeetCode 924 Minimize Malware Spread - Hard
924. Minimize Malware Spread -- Hard
LeetCode 887 Super Egg Drop - Hard
887. Super Egg Drop
LeetCode 87 Scramble String - Hard
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.
LeetCode 864 Shortest Path To Get All Keys - Hard
864. Shortest Path to Get All Keys -- Hard
LeetCode 850 Rectangle Area II - Hard
850. Rectangle Area II -- Hard
LeetCode 85 Maximal Rectangle - Hard
85. Maximal Rectangle -- Hard
LeetCode 829 Consecutive Numbers Sum - Hard
829. Consecutive Numbers Sum -- Hard
LeetCode 827 Making A Large Island - Hard
827. Making A Large Island -- Hard
LeetCode 786 Kth Smallest Prime Fraction - Hard
786. K-th Smallest Prime Fraction -- Hard
LeetCode 772 Basic Calculator III - Hard
772. Basic Calculator III -- Hard
LeetCode 76 Minimum Window Substring - Hard
76. Minimum Window Substring -- Hard
LeetCode 759 Employee Free Time - Hard
759. Employee Free Time -- Hard
LeetCode 741 Cherry Pickup - Hard
741. Cherry Pickup -- Hard
LeetCode 726 Number Of Atoms - Hard
726. Number of Atoms -- Hard
LeetCode 72 Edit Distance - Hard
Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2.
LeetCode 68 Text Justification - Hard
68. Text Justification -- Hard
LeetCode 679 24 Game - Hard
679. 24 Game -- Hard
LeetCode 52 N-Queens II - Hard
52. N-Queens II
LeetCode 51 N-Queens - Hard
51. N-Queens
LeetCode 493 Reverse Pairs - Hard
493. Reverse Pairs -- Hard
LeetCode 465 Optimal Account Balancing - Hard
465. Optimal Account Balancing -- Hard
LeetCode 440 Kth Smallest In Lexicographical Order - Hard
440. K-th Smallest in Lexicographical Order -- Hard
LeetCode 44 Wildcard Mathcing - Hard
Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for '?' and '*'.
LeetCode 42 Tapping Rain Water - Hard
42. Trapping Rain Water
LeetCode 410 Split Array Largest Sum - Hard
410. Split Array Largest Sum -- Hard
LeetCode 41 First Missing Positive - Hard
41. First Missing Positive
LeetCode 407 Trapping Rain Water II - Hard
407. Trapping Rain Water II -- Hard
LeetCode 403 Frog Jump - Hard
403. Frog Jump -- Hard
LeetCode 37 Suudku Solver - Hard
37. Sudoku Solver
LeetCode 363 Max Sum Of Rectangle No Larger Than K - Hard
363. Max Sum of Rectangle No Larger Than K -- Hard
LeetCode 354 Russian Doll Envelopes - Hard
You have a number of envelopes with widths and heights given as a pair of integers (w, h). One envelope can fit into another if and only …
LeetCode 340 Longest Substring With At Most K Distinct Characters - Hard
340. Longest Substring with At Most K Distinct Characters
LeetCode 336 Palindrome Pairs - Hard
336. Palindrome Pairs
LeetCode 329 Longest Increasing Path In A Matrix - Hard
329. Longest Increasing Path in a Matrix -- Hard
LeetCode 32 Longest Valid Parentheses - Hard
32. Longest Valid Parentheses -- Hard
LeetCode 317 Shortest Distance From All Buildings - Hard
317. Shortest Distance from All Buildings -- Hard
LeetCode 312 Burst Balloons - Hard
Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst al…
LeetCode 305 Number Of Islands II - Hard
305. Number of Islands II -- Hard
LeetCode 302 Smallest Rectangle Enclosing Black Pixels - Hard
302. Smallest Rectangle Enclosing Black Pixels
LeetCode 301 Remove Invalid Parentheses - Hard
301. Remove Invalid Parentheses -- Hard
LeetCode 297 Serialize And Deserialize Binary Tree - Hard
297. Serialize and Deserialize Binary Tree
LeetCode 295 Find Median From Data Stream - Hard
295. Find Median from Data Stream -- Hard
LeetCode 291 Word Pattern II - Hard
291. Word Pattern II
LeetCode 282 Expression Add Operators - Hard
282. Expression Add Operators -- Hard
LeetCode 273 Integer To Egnlish Words - Hard
273. Integer to English Words -- Hard
LeetCode 272 Closest Binary Search Tree Value II - Hard
272. Closest Binary Search Tree Value II
LeetCode 269 Alien Dictionary - Hard
269. Alien Dictionary
LeetCode 265 Paint House II - Hard
There are a row of n houses, each house can be painted with one of the k colors. The cost of painting each house with a certain color is …
LeetCode 25 Reverse Nodes In K-Group - Hard
25. Reverse Nodes in k-Group -- Hard
LeetCode 239 Sliding Window Maximum - Hard
239. Sliding Window Maximum
LeetCode 23 Merge K Sorted Lists - Hard
23. Merge k Sorted Lists
LeetCode 214 Shortest Palindrome - Hard
214. Shortest Palindrome
LeetCode 212 Wird Search II - Hard
212. Word Search II
LeetCode 188 Best Time To Buy And Sell Stock IV - Hard
Say you have an array for which the i-th element is the price of a given stock on day i.
LeetCode 1458 Max Dot Product Of Two Subsequences - Hard
1458. Max Dot Product of Two Subsequences
LeetCode 145 Binary Tree Postorder Traversal - Hard
145. Binary Tree Postorder Traversal
LeetCode 140 Word Break II - Hard
140. Word Break II -- Hard
LeetCode 132 Palindrome Partitioning II - Hard
Given a string s, partition s such that every substring of the partition is a palindrome.
LeetCode 1289 Minimum Falling Path Sum II - Hard
1289. Minimum Falling Path Sum II -- Hard
LeetCode 128 Longest Consecutive Sequence - Hard
128. Longest Consecutive Sequence -- Hard
LeetCode 1274 Number Of Ships In A Rectangle - Hard
1274. Number of Ships in a Rectangle -- Hard
LeetCode 126 Word Ladder II - Hard
126. Word Ladder II
LeetCode 124 Binary Tree Maximum Path Sum - Hard
124. Binary Tree Maximum Path Sum -- Hard
LeetCode 1235 Maximum Profit In Job Scheduling - Hard
1235. Maximum Profit in Job Scheduling -- Hard
LeetCode 123 Best Time To Buy And Sell Stock III - Hard
Say you have an array for which the ith element is the price of a given stock on day i.
LeetCode 1216 Valid Palindrome III - Hard
1216. Valid Palindrome III
LeetCode 1172 Dinner Plate Stacks - Hard
1172. Dinner Plate Stacks -- Hard
LeetCode 1153 String Transforms Into Another String - Hard
1153. String Transforms Into Another String -- Hard
LeetCode 115 Distinct Subsequnces - Hard
Given a string S and a string T, count the number of distinct subsequences of S which equals T.
LeetCode 1095 Find In Mountain Array - Hard
1095. Find in Mountain Array -- Hard
LeetCode 10 Regular Expression Matching - Hard
Given an input string (s) and a pattern (p), implement regular expression matching with support for '.' and '*'.