天天看点

【leetcode】高频题目整理_动态规划篇( High Frequency Problems, Dynamic Programming )

截止至今LeetCode题目总量已经有

1582题

,估计将来每年平均增长

300题

左右,大部分人肯定是

刷不完的

,所以得有选择地刷LeetCode。

一种公认的刷题策略是

按类别刷题

,可是每个类别也有许多题,在有限的时间里

到底该刷哪些题呢

?个人根据

LeetCode官方

给出的每个题目的

出现频率

,整理并收录了每个类别里

高频出现

的题目,对于官方统计频率太低的题目,不予收录,最终得到了这个高频题目表格。

例如,对于下图中题号

#275

#270

的题目将被收录,并且

#275

出现频率大于

#270

;而对于题号

#1011

#1182

的题目,因为出现频率太低,将不被收录:
【leetcode】高频题目整理_动态规划篇( High Frequency Problems, Dynamic Programming )

动态规划篇-110题(Dynamic Programming, 110 problems)

排序 题号 题目 通过率 难度
1 #5 Longest Palindromic Substring 0.291 中等
2 #53 Maximum Subarray 0.499 简单
3 #85 Maximal Rectangle 0.449 困难
4 #95 Unique Binary Search Trees II 0.623
5 #10 Regular Expression Matching 0.269
6 #72 Edit Distance 0.567
7 #96 Unique Binary Search Trees 0.652
8 #312 Burst Balloons 0.584
9 #70 Climbing Stairs 0.481
10 #121 Best Time to Buy and Sell Stock 0.538
11 #64 Minimum Path Sum 0.651
12 #309 Best Time to Buy and Sell Stock with Cooldown 0.528
13 #546 Remove Boxes 0.496
14 #120 Triangle 0.641
15 #552 Student Attendance Record II 0.392
16 #698 Partition to K Equal Sum Subsets 0.41
17 #303 Range Sum Query - Immutable 0.606
18 #300 Longest Increasing Subsequence 0.44
19 #516 Longest Palindromic Subsequence 0.518
20 #221 Maximal Square 0.393
21 #32 Longest Valid Parentheses 0.3
22 #357 Count Numbers with Unique Digits 0.507
23 #198 House Robber
24 #264 Ugly Number II 0.508
25 #877 Stone Game 0.679
26 #466 Count The Repetitions
27 #718 Maximum Length of Repeated Subarray 0.492
28 #375 Guess Number Higher or Lower II 0.372
29 #279 Perfect Squares 0.551
30 #413 Arithmetic Slices 0.602
31 #673 Number of Longest Increasing Subsequence 0.348
32 #647 Palindromic Substrings 0.613
33 #410 Split Array Largest Sum 0.414
34 #363 Max Sum of Rectangle No Larger Than K
35 #97 Interleaving String
36 #132 Palindrome Partitioning II 0.426
37 #62 Unique Paths 0.596
38 #368 Largest Divisible Subset 0.371
39 #338 Counting Bits 0.749
40 #689 Maximum Sum of 3 Non-Overlapping Subarrays 0.445
41 #87 Scramble String 0.459
42 #322 Coin Change 0.387
43 #464 Can I Win 0.333
44 #139 Word Break 0.441
45 #638 Shopping Offers 0.571
46 #343 Integer Break 0.553
47 #664 Strange Printer 0.43
48 #174 Dungeon Game 0.404
49 #152 Maximum Product Subarray 0.377
50 #321 Create Maximum Number 0.278
51 #650 2 Keys Keyboard 0.486
52 #600 Non-negative Integers without Consecutive Ones 0.305
53 #123 Best Time to Buy and Sell Stock III 0.422
54 #629 K Inverse Pairs Array 0.365
55 #486 Predict the Winner
56 #712 Minimum ASCII Delete Sum for Two Strings 0.62
57 #91 Decode Ways 0.233
58 #351 Android Unlock Patterns 0.59
59 #730 Count Different Palindromic Subsequences 0.474
60 #474 Ones and Zeroes 0.514
61 #213 House Robber II 0.37
62 #354 Russian Doll Envelopes 0.346
63 #741 Cherry Pickup 0.308
64 #956 Tallest Billboard 0.373
65 #639 Decode Ways II 0.264
66 #688 Knight Probability in Chessboard 0.463
67 #740 Delete and Earn 0.512
68 #1025 Divisor Game 0.689
69 #392 Is Subsequence
70 #1240 Tiling a Rectangle with the Fewest Squares 0.453
71 #115 Distinct Subsequences
72 #44 Wildcard Matching 0.271
73 #1130 Minimum Cost Tree From Leaf Values 0.572
74 #714 Best Time to Buy and Sell Stock with Transaction Fee 0.635
75 #188 Best Time to Buy and Sell Stock IV 0.294
76 #646 Maximum Length of Pair Chain 0.534
77 #967 Numbers With Same Consecutive Differences 0.355
78 #691 Stickers to Spell Word 0.448
79 #403 Frog Jump 0.335
80 #902 Numbers At Most N Given Digit Set 0.284
81 #377 Combination Sum IV 0.413
82 #63 Unique Paths II 0.326
83 #514 Freedom Trail 0.38
84 #494 Target Sum
85 #467 Unique Substrings in Wraparound String 0.403
86 #416 Partition Equal Subset Sum 0.461
87 #376 Wiggle Subsequence 0.415
88 #140 Word Break II 0.376
89 #1000 Minimum Cost to Merge Stones 0.307
90 #523 Continuous Subarray Sum 0.229
91 #576 Out of Boundary Paths 0.36
92 #517 Super Washing Machines 0.408
93 #256 Paint House 0.569
94 #361 Bomb Enemy 0.519
95 #304 Range Sum Query 2D - Immutable 0.431
96 #472 Concatenated Words 0.438
97 #656 Coin Path
98 #1024 Video Stitching
99 #446 Arithmetic Slices II - Subsequence 0.323
100 #651 4 Keys Keyboard 0.573
101 #276 Paint Fence 0.436
102 #471 Encode String with Shortest Length 0.527
103 #1388 Pizza With 3n Slices 0.395
104 #1220 Count Vowels Permutation 0.526
105 #265 Paint House II
106 #568 Maximum Vacation Days 0.451
107 #727 Minimum Window Subsequence 0.398
108 #418 Sentence Screen Fitting 0.343
109 #1277 Count Square Submatrices with All Ones 0.665
110 #1067 Digit Count in Range 0.349

相关/参考链接