Dorothydu's picture
Add files using upload-large-folder tool
c6f6cfd verified

每日一题

Day Number Title Solutions
1 70 climbing-stairs 递推(Go,Py)
2 66 plus-one O(n)遍历(Go,Py)
3 1 two-sum 先排序后双指针夹逼(Go), 字典缓存差值的索引(Go,Py)
4 24 swap-nodes-in-pairs 迭代(Go,Py), 递归(Go,Py)
5 21 merge-two-sorted-lists 迭代(Go, Py), 递归(Go,Py)
6 299 bulls-and-cows 数组记录可能的cows(Go, Py)
7 641 design-circular-deque 双指针(Go),双指针优化(Go,Py)
8 350 intersection-of-two-arrays-ii 哈希表计数(GoPy))
9 LCOF59 mac-sliding-window 单调递减队列(GoPy))
10 1021 remove-outermost-parentheses 双指针记录有效括号的起止(GoPy))
11 412 fizz-buzz 遍历(GoPy))
12 258 add-digits 迭代(GoPy)), 取余(GoPy))
13 104 maximum-depth-of-binary-tree 递归(GoPy)), 队列(GoPy))
14 283 move-zeroes 统计0的个数(Go,Py), 快慢指针(Go)
15 94 binary-tree-inorder-traversal 递归(Go,Py),栈(Go,Py), Morris遍历(Go,Py)
16 LCOF5 replace-space 新建一个buff(Go,Py)
17 LCOF6 reverse-print 遍历(Go,Py)
18 236 lowest-common-ancestor-of-a-binary-tree 递归(Go,Py)
19 1 two-sum 字典存num-index键值对(Go,Py)
20 15 3sum 双指针夹逼(Go,Py)
21 LCCI17 get-kth-magic-number-lcci 三指针(Go,Py), 小顶堆(Go,Py)
22 46 permutations 递归+回溯(Go,Py)
23 70 climbing-stairs 递推(Go,Py)
24 122 best-time-to-buy-and-sell-stock-ii 贪心(Go,Py)
25 860 lemonade-change 贪心(Go,Py)
26 200 numbers-of-islands 深度优先(Go,Py)
27 367 valid-perfect-square 二分查找(Go,Py)
28 169 majority-element 哈希表(Go,Py),计数投票(Go,Py)
29 127 word-ladder 广度优先(Go),双向广度优先(Go,Py)
30 1 two-sum 先排序后双指针夹逼(Go), 字典缓存差值的索引(Go,Py)
31 874 walking-robot-simulation 迭代(Go,Py)
32 53 maximum-subarray 迭代(Go,Py),分治(Go,Py)
33 1143 longest-common-subsequence 递归(Go,Py),动态规划(Go,Py),动态规划2(Go,Py)
34 74 search-a-2d-matrix 二分查找(Go,Py)
35 LCOF5 replace-space 新建一个buff(Go,Py)
36 64 minimum-path-sum 动态规划(Go,Py)
37 322 coin-change 递推(Go,Py),递归(Go,Py)
38 213 house-robber-ii 动态规划(Go,Py)
39 589 n-ary-tree-preorder-traversal 递归(Go,Py),栈(Go,Py)
40 363 max-sum-of-rectangle-no-larger-than-k TODO
41 33 search-in-rotated-sorted-array 二分查找(Go,Py)
42 212 word-search-ii 前缀树+回溯(Go,Py)
43 74 search-a-2d-matrix 二分查找(Go,Py)
44 208 implement-trie-prefix-tree 前缀树(Go,Py)
45 200 numbers-of-islands 深度优先(Go,Py)
46 53 maximum-subarray 迭代(Go,Py),分治(Go,Py)
47 127 word-ladder 广度优先(Go),双向广度优先(Go,Py)
48 15 3sum 双指针夹逼(Go,Py)
49 91 decode-ways 动态规划(Go,Py)
50 547 friend-circles 深度优先(Go,Py),并查集(Go,Py)
51 367 valid-perfect-square 二分查找(Go,Py)
52 198 house-robber 动态规划(Go,Py)
53 190 reverse_bits 迭代(Go,Py),分治位运算(Go,Py)
54 24 swap-nodes-in-pairs 迭代(Go,Py), 递归(Go,Py)
55 1122 relative-sort-array 计数排序(Go,Py)
56 718 maximum-length-of-repeated-subarray 动态规划(Go,Py),滑动窗口(Go,Py)
57 387 first-unique-character-in-a-string 迭代(Go,Py)
58 62 unique-paths 动态规划(Go,Py)
59 541 reverse-string-ii 迭代(Go,Py)
60 300 longest-increasing-subsequence 动态规划(Go,Py),贪心+二分搜索(Go,Py)
61 15 3sum 双指针夹逼(Go,Py)
62 680 valid-palindrome-ii 双指针夹逼(Go,Py)
63 32 longest-valid-parentheses 动态规划(Go,Py),栈(Go,Py),贪心(Go,Py)
64 83 remove-duplicates-from-sorted-list 迭代(Go,Py)
65 120 triangle 动态规划(Go,Py)
66 127 word-ladder 广度优先(Go),双向广度优先(Go,Py)
67 46 permutations 递归(Go,Py)
68 122 best-time-to-buy-and-sell-stock-ii 贪心(Go,Py)
69 238 product-of-array-except-self 迭代(Go,Py)
70 239 sliding-window-maximum 单调递减队列(Go, Py)

题解