My solutions for LeetCode problems.
Solutions are divided by problem category.
- 26 RemoveDuplicatesfromSortedArray
- 80 RemoveDuplicatesfromSortedArray II
- 33 Search in Rotated Sorted Array
- 81 Search in Rotated Sorted Array II
- 4 Median of Two Sorted Arrays
- 128 Longest Consecutive Sequence
- 1 Two Sum
- 15 3Sum
- 16 3Sum Closest
- 18 4Sum
- 27 Remove Element
- 31 Next Permutation
- 60 Permutation Sequence
- 36 Valid Sudoku
- 42 Trapping Rain Water
- 48 Rotate Image
- 66 Plus One
- 70 Climbing Stairs
- 89 Gray Code
- 73 Set Matrix Zeroes
- 134 Gas Station
- 135 Candy
- 136 Single Number
- 137 Single Number II
- 2 Add Two Numbers and C version
- 92 Reverse Linked List II
- 86 Partition List
- 83 Remove Duplicates from Sorted List
- 82 Remove Duplicates from Sorted List II
- 61 Rotate List
- 19 Remove Nth Node From End of List
- 24 Swap Nodes in Pairs
- 25 Reverse Nodes in k-Group
- 138 Copy List with Random Pointer
- 141 Linked List Cycle
- 142 Linked List Cycle II
- 143 Reorder List
- 146 LRU Cache
- 125 Valid Palindrome
- 28* Implement strStr()
- 8 String to Integer (atoi)
- 67 Add Binary
- 5 Longest Palindromic Substring
- 10 Regular Expression Matching
- 44 Wildcard Matching
- 14 Longest Common Prefix
- 65 Valid Number
- 12 Integer to Roman
- 13 Roman to Integer
- 38 Count and Say
- 49 Group Anagrams
- 71 Simplify Path
- 58 Length of Last Word
- 20 Valid Parentheses
- 32 Longest Valid Parentheses
- 84 Largest Rectangle in Histogram
- 150 Evaluate Reverse Polish Notation
- 144 Binary Tree Preorder Traversal
- 94 Binary Tree Inorder Traversal
- 145 Binary Tree Postorder Traversal
- 102 Binary Tree Level Order Traversal
- 107 Binary Tree Level Order Traversal II
- 103 Binary Tree Zigzag Level Order Traversal
- 99 Recover Binary Search Tree
- 100 Same Tree
- 101 Symmetric Tree
- 110 Balanced Binary Tree
- 114 Flatten Binary Tree to Linked List
- 117 Populating Next Right Pointers in Each Node II
- 105 Construct Binary Tree from Preorder and Inorder Traversal
- 106 Construct Binary Tree from Inorder and Postorder Traversal
- 96 Unique Binary Search Trees
- 95 Unique Binary Search Trees II
- 112 Path Sum
- 113 Path Sum II
- 108 Convert Sorted Array to Binary Search Tree
- 109 Convert Sorted List to Binary Search Tree
- 111 Minimum Depth of Binary Tree
- 88 Merge Sorted Array
- 21 Merge Two Sorted Lists
- 23 Merge k Sorted Lists
- 147 Insertion Sort List
- 148 Sort List
- 41 First Missing Positive
- 75 Sort Colors
- 34 Find First and Last Position of Element in Sorted Array
- 35 Search Insert Position
- 74 Search a 2D Matrix
- 78 Subsets
- 90 Subsets II
- 46 Permutations
- 47 Permutations II
- 77 Combinations
- 17 Letter Combinations of a Phone Number
- 127 Word Ladder
- 55 Jump Game
- 45 Jump Game II
- 121 Best Time to Buy and Sell Stock
- 122 Best Time to Buy and Sell Stock II
- 122 Longest Substring Without Repeating Characters
- 11 Container With Most Water
- 62 Unique Paths
- 63 Unique Paths II
- 64 Minimum Path Sum