leetcode_practice

ID Title Difficulty Solution
1 Two Sum Easy HashMap
2 Add Two Numbers Medium LinkedList
3 Longest Substring Without Repeating Characters Medium Slide window
4 Median of Two Sorted Arrays Hard LinkedList
5 Longest Palindromic Substring Medium Array
7 Reverse Integer Easy Array
8 String to Integer (atoi) Medium Array
9 Palindrome Number Easy String
11 Container With Most Water Medium [Array
14 Longest Common Prefix Easy String
15 Three Sum Medium Array, double pointer
16 3Sum Closest Medium Array, double pointer
18 Four Sum Medium Array
20 Valid Parentheses Easy Stack
21 Merge Two Sorted Lists Easy LinkedList
22 Generate Parentheses Medium Recursion
23 Merge k Sorted Lists Hard LinkedList
24 Swap Nodes in Pairs Medium LinkedList
25 Reverse Nodes in k-Group Hard LinkedList
26 Remove Duplicates from Sorted Array Easy Array
33 Search in Rotated Sorted Array Medium Array, binary search
36 Valid Sudoku Medium Prune
37 Sudoku Solver Hard Prune
43 Multiply Strings Medium Array, digit
46 Permutations Medium Recursion
50 Pow(x, n) Medium Recursion
51 N-Queens Hard Prune
52 N-Queens II Hard Prune
53 Maximum Subarray Easy Dp
59 Spiral Matrix II Medium Array
61 Rotate List Medium LinkedList
62 Unique Paths Medium Dp
70 Climbing Stairs Easy Dp
72 Edit Distance Hard Dp or recursion
78 subsets Medium Recursion, backtrack
82 Remove Duplicates from Sorted List II Medium LinkedList
83 Remove Duplicates from Sorted List Easy LinkedList
88 Merge Sorted Array Easy Array, double pointer
89 Gray Code Medium Dp
94 Binary Tree Inorder Traversal Medium Tree
98 Validate Binary Search Tree Medium Tree
102 Binary Tree Level Order Traversal Medium Tree
104 Maximum Depth of Binary Tree Easy Tree
105 Construct Binary Tree from Preorder and Inorder Traversal Medium Tree
110 Balanced Binary Tree Easy Tree
111 Minimum Depth of Binary Tree Easy Tree
121 Best Time to Buy and Sell Stock Easy Dp, double pointer
122 Best Time to Buy and Sell Stock II Easy Greedy
124 Binary Tree Maximum Path Sum Medium Tree
128 Longest Consecutive Sequence Hard Array, hashmap + dp
129 Sum Root to Leaf Numbers Medium [Tree
136 Single Number Easy Dp, XOR
141 Linked List Cycle Easy LinkedList
142 Linked List Cycle II Medium LinkedList
144 Binary Tree Preorder Traversal Medium Tree, recursion, iteration
146 LRU Medium Double linkedList, hash table
148 Sort List Medium LinkedList, merge sort
155 Min Stack Easy Stack
160 Intersection of two linked lists Easy LinkedList
169 Majority Element Easy Sort
206 Reverse Linked List Medium LinkedList
225 Implement Stack using Queues Easy Queue
232 Implement Queue using Stacks Easy Stack
235 Lowest Common Ancestor of a Binary Search Tree Easy Tree
236 Lowest Common Ancestor of a Binary Tree Medium Tree
239 Sliding Window Maximum Hard Queue
242 Valid Anagram Easy HashMap
703 Kth Largest Element in a Stream Medium Stack
938 Range Sum of BST Easy Tree, recursion
1438 Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit Medium Slide window+Monotonic stack