leetcode面试频率

转载:http://blog.csdn.net/alpaca12/article/details/51647261

ID问题频率数据结构算法
1Two Sum5array、setsort、Two Pointers
8String to Integer (atoi)5stringMath
153Sum5arrayTwo Pointers
20Valid Parentheses5stringStack
21Merge Two Sorted Lists5linked listsort、Two Pointers、merge
28Implement strStr()5stringTwo Pointers、KMP、rolling hash
50Pow(x, n)5Binary Search、Math
56Merge Intervals5array、linked list、red-black treesort、merge
57Insert Interval5arraysort
65Valid Number5stringMath
70Climbing Stairs5DP
73Set Matrix Zeroes5array
88Merge Sorted Array5arrayTwo Pointers、merge
98Validate Binary Search Tree5treeDFS
125Valid Palindrome5stringTwo Pointers
127Word Ladder5graphBFS、path
2Add Two Numbers4linked listTwo Pointers、Math
12Integer to Roman4Math
13Roman to Integer4Math
22Generate Parentheses4stringDFS
23Merge k Sorted Lists4linked list、heapsort、Two Pointersmerge
24Swap Nodes in Pairs4linked list
27Remove Element4arrayTwo Pointers
46Permutations4arraypermutation
49Anagrams4string、hashtable
67Add Binary4stringTwo Pointers、Math
69Sqrt(x)4Binary Search
77Combinations4combination
78Subsets4arrayRecursion、combination
79Word Search4arrayDFS
91Decode Ways4stringRecursion、DP
102Binary Tree Level Order Traversal4treeBFS
129Sum Root to Leaf Numbers4treeDFS
131Palindrome Partitioning4stringDFS
4Median of Two Sorted Arrays3arrayBinary Search
7Reverse Integer3Math
10Regular Expression Matching3stringRecursion、DP
17Letter Combinations of a Phone Number3stringDFS
19Remove Nth Node From End of List3linked listTwo Pointers
26Remove Duplicates from Sorted Array3arrayTwo Pointers
29Divide Two Integers3Binary Search
33Search in Rotated Sorted Array3arrayBinary Search
34Search for a Range3arrayBinary Search
39Combination Sum3arraycombination
43Multiply Strings3stringTwo Pointers、Math
44Wildcard Matching3stringRecursion、DP、greedy
51N-Queens3arrayDFS
52N-Queens II3arrayDFS
53Maximum Subarray3arrayDP
62Unique Paths3arrayDP
63Unique Paths II3arrayDP
64Minimum Path Sum3arrayDP
72Edit Distance3stringDP
74Search a 2D Matrix3arrayBinary Search
81Search in Rotated Sorted Array II3arrayBinary Search
82Remove Duplicates from Sorted List II3linked listRecursion、Two Pointers
83Remove Duplicates from Sorted List3linked list
86Partition List3linked listTwo Pointers
93Restore IP Addresses3stringDFS
94Binary Tree Inorder Traversal3tree、hashtableRecursion、morris、Stack
103Binary Tree Zigzag Level Order Traversal3queue、treeBFS、Stack
105Construct Binary Tree from Preorder and Inorder Tr3array、treeDFS
106Construct Binary Tree from Inorder and Postorder T3array、treeDFS
108Convert Sorted Array to Binary Search Tree3treeDFS
109Convert Sorted List to Binary Search Tree3linked listRecursion、Two Pointers
112Path Sum3treeDFS
114Flatten Binary Tree to Linked List3treeRecursion、Stack
116Populating Next Right Pointers in Each Node3treeDFS
128Longest Consecutive Sequence3array
130Surrounded Regions3arrayBFS、DFS
132Palindrome Partitioning II3stringDP
3Longest Substring Without Repeating Characters2string、hashtableTwo Pointers
5Longest Palindromic Substring2string
9Palindrome Number2Math
11Container With Most Water2arrayTwo Pointers
184Sum2array
25Reverse Nodes in k-Group2linked listRecursion、Two Pointers
31Next Permutation2arraypermutation
35Search Insert Position2array
36Valid Sudoku2array
37Sudoku Solver2arrayDFS
38Count and Say2stringTwo Pointers
40Combination Sum II2arraycombination
41First Missing Positive2arraysort
42Trapping Rain Water2arrayTwo Pointers、Stack
45Jump Game II2array
47Permutations II2arraypermutation
48Rotate Image2array
54Spiral Matrix2array
55Jump Game2array
59Spiral Matrix II2array
61Rotate List2linked listTwo Pointers
66Plus One2arrayMath
68Text Justification2string
75Sort Colors2arraysort、Two Pointers
76Minimum Window Substring2stringTwo Pointers
80Remove Duplicates from Sorted Array II2arrayTwo Pointers
84Largest Rectangle in Histogram2arrayStack
87Scramble String2stringRecursion、DP
89Gray Code2combination
90Subsets II2arrayRecursion、combination
92Reverse Linked List II2linked listTwo Pointers
97Interleaving String2stringRecursion、DP
99Recover Binary Search Tree2treeDFS
101Symmetric Tree2treeDFS
110Balanced Binary Tree2treeDFS
113Path Sum II2treeDFS
115Distinct Subsequences2stringDP
117Populating Next Right Pointers in Each Node II2treeDFS
124Binary Tree Maximum Path Sum2treeDFS
6ZigZag Conversion1string
14Longest Common Prefix1string
163Sum Closest1arrayTwo Pointers
30Substring with Concatenation of All Words1stringTwo Pointers
32Longest Valid Parentheses1stringDP
58Length of Last Word1string
60Permutation Sequence1permutation、Math
71Simplify Path1stringStack
85Maximal Rectangle1arrayDP、Stack
95Unique Binary Search Trees II1treeDP、DFS
96Unique Binary Search Trees1treeDP
100Same Tree1treeDFS
104Maximum Depth of Binary Tree1treeDFS
107Binary Tree Level Order Traversal II1treeBFS
111Minimum Depth of Binary Tree1treeDFS
118Pascal’s Triangle1array
119Pascal’s Triangle II1array
120Triangle1arrayDP
121Best Time to Buy and Sell Stock1arrayDP
122Best Time to Buy and Sell Stock II1arraygreedy
123Best Time to Buy and Sell Stock III1arrayDP
126Word Ladder II1
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值