Skip to content

chao-ji/LeetCode

Repository files navigation

LeetCode

Array

↳Hash Table

1. Two Sum

128. Longest Consecutive Sequence

560. Subarray Sum Equals K

↳Math

66. Plus One

67. Add Binary

↳Matrix

36. Valid Sudoku

48. Rotate Image

54. Spiral Matrix

59. Spiral Matrix II

↳Permuation

60. Permutation Sequence

↳Use Input Array as Auxiliary Memory

26. Remove Duplicates from Sorted Array

27. Remove Element

41. First Missing Positive

73. Set Matrix Zeroes

75. Sort Colors

80. Remove Duplicates from Sorted Array II

88. Merge Sorted Array

Bit Manipulation

136. Single Number

137. Single Number II

Divide & Conquer

50. Pow(x, n)

↳String

14. Longest Common Prefix

Geometry

149. Max Points on a Line

Greedy

122. Best Time to Buy and Sell Stock II

134. Gas Station

135. Candy

45. Jump Game II

55. Jump Game

Math

12. Integer to Roman

13. Roman to Integer

7. Reverse Integer

9. Palindrome Number

Sort

56. Merge Intervals

57. Insert Interval

String

125. Valid Palindrome

151. Reverse Words in a String

38. Count and Say

49. Group Anagrams

58. Length of Last Word

Two Pointers

↳Zigzag search space traversal

11. Container With Most Water

15. 3Sum

16. 3Sum Closest

18. 4Sum

167. Two Sum II - Input array is sorted

↳Sliding Window

30. Substring with Concatenation of All Words

3. Longest Substring Without Repeating Characters

76. Minimum Window Substring

Binary Search

34. Find First and Last Position of Element in Sorted Array

35. Search Insert Position

4. Median of Two Sorted Arrays

69. Sqrt(x)

↳Matrix

74. Search a 2D Matrix

↳Rotated Array

153. Find Minimum in Rotated Sorted Array

154. Find Minimum in Rotated Sorted Array II

33. Search in Rotated Sorted Array

81. Search in Rotated Sorted Array II

Design

146. LRU Cache

155. Min Stack

225. Implement Stack using Queues

232. Implement Queue using Stacks

Dynamic Programming

↳1-Dimensional

39. Combination Sum

123. Best Time to Buy and Sell Stock III

131. Palindrome Partitioning

139. Word Break

140. Word Break II

152. Maximum Product Subarray

22. Generate Parentheses

279. Perfect Squares

300. Longest Increasing Subsequence

322. Coin Change

343. Integer Break

377. Combination Sum IV

53. Maximum Subarray

70. Climbing Stairs

91. Decode Ways

93. Restore IP Addresses

96. Unique Binary Search Trees

↳2-Dimensional Regular

118. Pascal's Triangle

119. Pascal's Triangle II

120. Triangle

188. Best Time to Buy and Sell Stock IV

221. Maximal Square

62. Unique Paths

63. Unique Paths II

64. Minimum Path Sum

↳2-Dimensional String

10. Regular Expression Matching

115. Distinct Subsequences

132. Palindrome Partitioning II

44. Wildcard Matching

5. Longest Palindromic Substring

72. Edit Distance

97. Interleaving String

↳3-Dimensional

87. Scramble String

↳Constant Memory

121. Best Time to Buy and Sell Stock

Graph

133. Clone Graph

Linked List

109. Convert Sorted List to Binary Search Tree

138. Copy List with Random Pointer

141. Linked List Cycle

142. Linked List Cycle II

143. Reorder List

147. Insertion Sort List

148. Sort List

19. Remove Nth Node From End of List

203. Remove Linked List Elements

206. Reverse Linked List

21. Merge Two Sorted Lists

24. Swap Nodes in Pairs

25. Reverse Nodes in k-Group

61. Rotate List

82. Remove Duplicates from Sorted List II

83. Remove Duplicates from Sorted List

86. Partition List

92. Reverse Linked List II

↳Heap

23. Merge k Sorted Lists

↳Math

2. Add Two Numbers

Recursion

17. Letter Combinations of a Phone Number

40. Combination Sum II

46. Permutations

47. Permutations II

77. Combinations

78. Subsets

90. Subsets II

216. Combination Sum III

↳Backtracking

113. Path Sum II

37. Sudoku Solver

51. N-Queens

52. N-Queens II

79. Word Search

89. Gray Code

↳Depth First Search

130. Surrounded Regions

200. Number of Islands

Stack

150. Evaluate Reverse Polish Notation

20. Valid Parentheses

42. Trapping Rain Water

84. Largest Rectangle in Histogram

85. Maximal Rectangle

Tree

100. Same Tree

101. Symmetric Tree

102. Binary Tree Level Order Traversal

103. Binary Tree Zigzag Level Order Traversal

104. Maximum Depth of Binary Tree

105. Construct Binary Tree from Preorder and Inorder Traversal

106. Construct Binary Tree from Inorder and Postorder Traversal

107. Binary Tree Level Order Traversal II

108. Convert Sorted Array to Binary Search Tree

110. Balanced Binary Tree

111. Minimum Depth of Binary Tree

112. Path Sum

114. Flatten Binary Tree to Linked List

116. Populating Next Right Pointers in Each Node

117. Populating Next Right Pointers in Each Node II

124. Binary Tree Maximum Path Sum

129. Sum Root to Leaf Numbers

144. Binary Tree Preorder Traversal

226. Invert Binary Tree

235. Lowest Common Ancestor of a Binary Search Tree

236. Lowest Common Ancestor of a Binary Tree

94. Binary Tree Inorder Traversal

95. Unique Binary Search Trees II

98. Validate Binary Search Tree

99. Recover Binary Search Tree

About

leetcode problem solutions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published