设为首页 - 加入收藏 焦点技术网
热搜:java
当前位置:首页 >

LeetCode 问题难度,面试出现频率及问题相关数据结构和算法

2014-11-09 12:52:00.0 LeetCode leetcode  
导读: LeetCode 问题难度,面试出现频率及问题相关数据结构和算法转载自http://blog.csdn.net/kenden23/article/details/14109347统计了LeetCode各个问题的难度,频率,数据结构和算法LeetCode Question Difficulty Distribution        IDQuestionDiffFreqData Structure...。。。

 

LeetCode 问题难度,面试出现频率及问题相关数据结构和算法


转载自http://blog.csdn.net/kenden23/article/details/14109347

统计了LeetCode各个问题的难度,频率,数据结构和算法

 

       

IDQuestionDiffFreqData StructureAlgorithms 
        
       

1Two Sum25arraysort

    setTwo Pointers

2Add Two Numbers34linked listTwo Pointers

     Math

3Longest Substring Without Repeating Characters32stringTwo Pointers

    hashtable 

4Median of Two Sorted Arrays53arrayBinary Search

5Longest Palindromic Substring42string 

6ZigZag Conversion31string 

7Reverse Integer23 Math

8String to Integer (atoi)25stringMath

9Palindrome Number22 Math

10Regular Expression Matching53stringRecursion

     DP

11Container With Most Water32arrayTwo Pointers

12Integer to Roman34 Math

13Roman to Integer24 Math

14Longest Common Prefix21string 

153Sum35arrayTwo Pointers

163Sum Closest31arrayTwo Pointers

17Letter Combinations of a Phone Number33stringDFS

184Sum32array 

19Remove Nth Node From End of List23linked listTwo Pointers

20Valid Parentheses25stringStack

21Merge Two Sorted Lists25linked listsort

     Two Pointers

     merge

22Generate Parentheses34stringDFS

23Merge k Sorted Lists34linked listsort

    heapTwo Pointers

     merge

24Swap Nodes in Pairs24linked list 

25Reverse Nodes in k-Group42linked listRecursion

     Two Pointers

26Remove Duplicates from Sorted Array13arrayTwo Pointers

27Remove Element14arrayTwo Pointers

28Implement strStr()45stringTwo Pointers

     KMP

     rolling hash

29Divide Two Integers43 Binary Search

     Math

30Substring with Concatenation of All Words31stringTwo Pointers

31Next Permutation52arraypermutation

32Longest Valid Parentheses41stringDP

33Search in Rotated Sorted Array43arrayBinary Search

34Search for a Range43arrayBinary Search

35Search Insert Position22array 

36Valid Sudoku22array 

37Sudoku Solver42arrayDFS

38Count and Say22stringTwo Pointers

39Combination Sum33arraycombination

40Combination Sum II42arraycombination

41First Missing Positive52arraysort

42Trapping Rain Water42arrayTwo Pointers

     Stack

43Multiply Strings43stringTwo Pointers

     Math

44Wildcard Matching53stringRecursion

     DP

     greedy

45Jump Game II42array 

46Permutations34arraypermutation

47Permutations II42arraypermutation

48Rotate Image42array 

49Anagrams34string 

    hashtable 

50Pow(x, n)35 Binary Search

     Math

51N-Queens43arrayDFS

52N-Queens II43arrayDFS

53Maximum Subarray33arrayDP

54Spiral Matrix42array 

55Jump Game32array 

56Merge Intervals45arraysort

    linked listmerge

    red-black tree 

57Insert Interval45arraysort

    linked listmerge

    red-black tree 

58Length of Last Word11string 

59Spiral Matrix II32array 

60Permutation Sequence51 permutation

     Math

61Rotate List32linked listTwo Pointers

62Unique Paths23arrayDP

63Unique Paths II33arrayDP

64Minimum Path Sum33arrayDP

65Valid Number25stringMath

66Plus One12arrayMath

67Add Binary24stringTwo Pointers

     Math

68Text Justification42string 

69Sqrt(x)44 Binary Search

70Climbing Stairs25 DP

71Simplify Path31stringStack

72Edit Distance43stringDP

73Set Matrix Zeroes35array 

74Search a 2D Matrix33arrayBinary Search

75Sort Colors42arraysort

     Two Pointers

76Minimum Window Substring42stringTwo Pointers

77Combinations34 combination

78Subsets34arrayRecursion

     combination

79Word Search34arrayDFS

80Remove Duplicates from Sorted Array II22arrayTwo Pointers

81Search in Rotated Sorted Array II53arrayBinary Search

82Remove Duplicates from Sorted List II33linked listRecursion

     Two Pointers

83Remove Duplicates from Sorted List13linked list 

84Largest Rectangle in Histogram52arrayStack

85Maximal Rectangle51arrayDP

     Stack

86Partition List33linked listTwo Pointers

87Scramble String52stringRecursion

     DP

88Merge Sorted Array25arrayTwo Pointers

     merge

89Gray Code42 combination

90Subsets II42arrayRecursion

     combination

91Decode Ways34stringRecursion

     DP

92Reverse Linked List II32linked listTwo Pointers

93Restore IP Addresses33stringDFS

94Binary Tree Inorder Traversal43treeRecursion

    hashtablemorris

     Stack

95Unique Binary Search Trees II41treeDP

     DFS

96Unique Binary Search Trees31treeDP

97Interleaving String52stringRecursion

     DP

98Validate Binary Search Tree35treeDFS

99Recover Binary Search Tree42treeDFS

100Same Tree11treeDFS

101Symmetric Tree12treeDFS

102Binary Tree Level Order Traversal34treeBFS

103Binary Tree Zigzag Level Order Traversal43queueBFS

    treeStack

104Maximum Depth of Binary Tree11treeDFS

105Construct Binary Tree from Preorder and Inorder Tr33arrayDFS

    tree 

106Construct Binary Tree from Inorder and Postorder T33arrayDFS

    tree 

107Binary Tree Level Order Traversal II31treeBFS

108Convert Sorted Array to Binary Search Tree23treeDFS

109Convert Sorted List to Binary Search Tree43linked listRecursion

     Two Pointers

110Balanced Binary Tree12treeDFS

111Minimum Depth of Binary Tree11treeDFS

112Path Sum13treeDFS

113Path Sum II22treeDFS

114Flatten Binary Tree to Linked List33treeRecursion

     Stack

115Distinct Subsequences42stringDP

116Populating Next Right Pointers in Each Node33treeDFS

117Populating Next Right Pointers in Each Node II42treeDFS

118Pascal's Triangle21array 

119Pascal's Triangle II21array 

120Triangle31arrayDP

121Best Time to Buy and Sell Stock21arrayDP

122Best Time to Buy and Sell Stock II31arraygreedy

123Best Time to Buy and Sell Stock III41arrayDP

124Binary Tree Maximum Path Sum42treeDFS

125Valid Palindrome25stringTwo Pointers

126Word Ladder II11  

127Word Ladder35graphBFS

     shortest path

128Longest Consecutive Sequence43array 

129Sum Root to Leaf Numbers24treeDFS

130Surrounded Regions43arrayBFS

     DFS

131Palindrome Partitioning34stringDFS

132Palindrome Partitioning II43stringDP

(编辑: yangliuy)

网友评论