Repository of my LeetCode code
# | Problem | Difficulty | Tags | Note |
---|---|---|---|---|
0001 | Two Sum | Medium | Array Hash Table |
O(N^2) -> O(N) + O(N) hashtable |
0002 | Add Two Numbers | Medium | Linked List |
|
0007 | Reverse Integer | Medium | List |
|
0013 | Roman To Integer | Easy | Math , String |
|
0014 | Common Prefix | Easy | ||
0020 | Valid Parenthesis | Easy | Stack |
|
0021 | MergeTwoSortedList | Easy | Recursion |
|
0022 | Generate Parenthesis | Medium | Backtracking |
|
0026 | Remove Duplicates from Sorted Array | Easy | Array |
|
0028 | StrStr | Easy | String |
KMP Algorithm |
0046 | Permutations | Medium | Backtracking |
|
0053 | MaxSubArray | Medium | Dynamic Programming |
|
0061 | PlusOne | Medium | Dynamic Programming |
|
0069 | Sqrt(x) | Medium | Binary Search |
|
0070 | ClimbingStairs | Easy | Dynamic Programming |
|
0078 | Subsets | Medium | Backtracking |
|
0088 | MergeSortedArray | Easy | Sort |
|
0094 | BT In-order Traversal | Medium | Tree |
|
0104 | MaxDepth of BT | Easy | Recursion |
|
0108 | SortedList to BST | Medium | Recursion |
|
0118 | Pascal's Triangle | Easy | Array |
|
0121 | Best Time to Buy-Sell Stock | Easy | Array |
|
0122 | Best Time to Buy-Sell Stock II | Easy | Greedy |
|
0136 | Single Number | Easy | HashTable |
|
0141 | Linked List Cycle | Easy | TwoPointer |
|
0169 | Majority Element | Easy | Moyer–Moore Majority Vote Algorithm |
|
0171 | ExcelSheetColumnNumber | Easy | Math , Ord |
|
0189 | Rotate Array | Easy | Array |
|
0190 | Reverse Bits | Easy | Bit Manipulation |
|
0191 | Number 1 Bits | Easy | Bit Manipulation |
|
0202 | Happy Number | Easy | HashTable |
|
0204 | Count Primes | Easy | HashTable |
|
0206 | Reverse LinkedList | Easy | Linked List |
|
0217 | Contains Duplicate | Easy | HashTable |
|
0237 | DeleteNodeOfLinkedList | Easy | Linked List |
|
0238 | Array Product Except Self | Medium | Array |
|
0242 | Valid Anagram | Easy | String |
|
0263 | Ugly Number | Easy | Math |
|
0264 | Ugly Number II | Medium | Heap , BST |
|
0268 | Missing Number | Medium | Gauss Formula , Math |
|
0283 | Move Zeros | Easy | Two Pointers |
|
0322 | CoinChange | Medium | Dynamic Programming |
|
0326 | PowerOfThree | Easy | Math |
|
0347 | TopKFrequentElements | Medium | Sort Heap |
|
0350 | IntersectionOfTwoArraysII | Easy | Two Pointers Math Hash Binary Search |
|
0371 | SumofTwoIntegers | Easy | Math |
|
0387 | PowerOfThree | Easy | Bit Manipulation |
|
0412 | FizzBuzz | Easy | Array |
|
0543 | DiameterBinaryTree | Easy | Tree |