|
60 | 60 | |362|[Design Hit Counter](https://leetcode.com/problems/design-hit-counter/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/DesignHitCounter.java)| O(1) amortized|O(k) | Medium| Design
|
61 | 61 | |361|[Bomb Enemy](https://leetcode.com/problems/bomb-enemy/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/BombEnemies.java)| O(?)|O(?) | Medium|
|
62 | 62 | |359|[Logger Rate Limiter](https://leetcode.com/problems/logger-rate-limiter/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/LoggerRateLimiter.java)| amortized O(1)|O(k) | Easy| HashMap
|
| 63 | +|357|[Count Numbers with Unique Digits](https://leetcode.com/problems/count-numbers-with-unique-digits/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/CountNumbersWithUniqueDigits.java)| O(?)|O(?) | Medium| |
| 64 | +|353|[Design Snake Game](https://leetcode.com/problems/design-snake-game/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/DesignSnakeGame.java)| O(?)|O(?) | Medium| |
63 | 65 | |351|[Android Unlock Patterns](https://leetcode.com/problems/android-unlock-patterns/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/AndroidUnlockPatterns.java)| O(?)|O(?) | Medium|
|
64 | 66 | |350|[Intersection of Two Arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/IntersectionOfTwoArraysII.java)| O(m+n)|O((m+n)) could be optimized | Easy| HashMap, Binary Search
|
65 | 67 | |349|[Intersection of Two Arrays](https://leetcode.com/problems/intersection-of-two-arrays/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/IntersectionOfTwoArrays.java)| O(m+n)|O(min(m,n)) | Easy| Two Pointers, Binary Search
|
|
75 | 77 | |325|[Maximum Size Subarray Sum Equals k](https://leetcode.com/problems/maximum-size-subarray-sum-equals-k/)|[Solution] | O(n)|O(n) | Medium| HashMap
|
76 | 78 | |323|[Number of Connected Components in an Undirected Graph](https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/NumberOfConnectedComponentsInAnUndirectedGraph.java)| O(?)|O(?)| Medium|
|
77 | 79 | |322|[Coin Change](https://leetcode.com/problems/coin-change/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/CoinChange.java)| O(?)|O(?) | Medium|
|
| 80 | +|321|[Create Maximum Number](https://leetcode.com/problems/create-maximum-number/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/CreateMaximumNumber.java)| O(?)|O(?) | Hard |
78 | 81 | |317|[Shortest Distance from All Buildings](https://leetcode.com/problems/shortest-distance-from-all-buildings/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/ShortestDistanceFromAllBuildings.java)| O(?)|O(?) | Hard|
|
79 | 82 | |315|[Count of Smaller Numbers After Self](https://leetcode.com/problems/count-of-smaller-numbers-after-self/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/CountOfSmallerNumbersAfterSelf.java)| O(?)|O(?)| Hard| Tree
|
80 | 83 | |314|[Binary Tree Vertical Order Traversal](https://leetcode.com/problems/binary-tree-vertical-order-traversal/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/BinaryTreeVerticalOrderTraversal.java)| O(n)|O(n) | Medium| HashMap, BFS
|
|
201 | 204 | |141|[Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/LinkedListCycle.java)| O(n)|O(1) | Easy| Linked List
|
202 | 205 | |140|[Word Break II](https://leetcode.com/problems/word-break-ii/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/WordBreakII.java)| ? |O(n^2) | Hard| Backtracking/DFS
|
203 | 206 | |139|[Word Break](https://leetcode.com/problems/word-break/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/WordBreak.java)| O(n^2)|O(n) | Medium| DP
|
| 207 | +|138|[Copy List with Random Pointer](https://leetcode.com/problems/copy-list-with-random-pointer/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/CopyListWithRandomPointer.java)| O(?)|O(?) | Medium| |
204 | 208 | |137|[Single Number II](https://leetcode.com/problems/single-number-ii/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/SingleNumberII.java)| O(n)|O(n) | Medium|
|
205 | 209 | |135|[Candy](https://leetcode.com/problems/candy/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/Candy.java)| O(n)|O(1) | Hard| Greedy
|
206 | 210 | |133|[Clone Graph](https://leetcode.com/problems/clone-graph/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/CloneGraph.java)| O(n)|O(n) | Medium| HashMap, BFS
|
207 | 211 | |132|[Implement Queue using Stacks](https://leetcode.com/problems/implement-queue-using-stacks/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/ImplementQueueUsingStacks.java)| O(n)|O(n) | Easy| Stack, Queue
|
208 | 212 | |129|[Sum Root to Leaf Numbers](https://leetcode.com/problems/sum-root-to-leaf-numbers/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/SumRootToLeafNumbers.java)| O(n)|O(h) | Medium| DFS
|
209 | 213 | |125|[Valid Palindrome](https://leetcode.com/problems/valid-palindrome/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/ValidPalindrome.java)| O(n)|O(1) | Easy| Two Pointers
|
210 | 214 | |124|[Binary Tree Maximum Path Sum](https://leetcode.com/problems/binary-tree-maximum-path-sum/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/BinaryTreeMaximumPathSum.java)| O(n)|O(h) | Hard | Tree
|
| 215 | +|123|[Best Time to Buy and Sell Stock III](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/BestTimeToBuyAndSellStockIII.java)| O(?)|O(?) | Hard | |
211 | 216 | |122|[Best Time to Buy and Sell Stock II](https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/BestTimeToBuyAndSellStockII.java)| O(n)|O(1) | Medium | Greedy
|
212 | 217 | |121|[Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/BestTimeToBuyAndSellStock.java)| O(n)|O(1) | Easy| DP
|
213 | 218 | |120|[Triangle](https://leetcode.com/problems/triangle/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/Triangle.java)| O(m*n)|O(n) | Medium| DP
|
|
223 | 228 | |109|[Convert Sorted List to Binary Search Tree](https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/ConvertSortedListtoBinarySearchTree.java)| O(n)|O(h) | Medium | DFS, Recursion
|
224 | 229 | |108|[Convert Sorted Array to Binary Search Tree](https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/ConvertSortedArraytoBinarySearchTree.java)| O(n)|O(h) | Medium| Tree
|
225 | 230 | |107|[Binary Tree Level Order Traversal II](https://leetcode.com/problems/binary-tree-level-order-traversal-ii/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/BinaryTreeLevelOrderTraversalII.java)| O(nlogn)|O(h) | Easy| BFS
|
| 231 | +|105|[Construct Binary Tree from Preorder and Inorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/ConstructBinaryTreefromPreorderandInorderTraversal.java)| O(?)|O(?) | Medium| |
226 | 232 | |104|[Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/MaximumDepthOfBinaryTree.java)| O(n)|O(h) | Easy| DFS
|
227 | 233 | |103|[Binary Tree Zigzag Level Order Traversal](https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/BinaryTreeZigzagLevelOrderTraversal.java)| O(n)|O(h) | Medium| BFS,DFS
|
228 | 234 | |102|[Binary Tree Level Order Traversal](https://leetcode.com/problems/binary-tree-level-order-traversal/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/BinaryTreeLevelOrderTraversal.java)| O(n)|O(h) | Easy| BFS
|
| 235 | +|99|[Recover Binary Search Tree](https://leetcode.com/problems/recover-binary-search-tree/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/RecoverBinarySearchTree.java) | O(?) | O(?) | Hard | |
229 | 236 | |98|[Validate Binary Search Tree](https://leetcode.com/problems/validate-binary-search-tree/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/ValidateBinarySearchTree.java) | O(n) | O(h) | Medium | DFS/Recursion
|
230 | 237 | |97|[Interleaving String](https://leetcode.com/problems/interleaving-string/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/InterleavingString.java)| O(?)|O(?) | Hard| DP
|
231 | 238 | |96|[Unique Binary Search Trees](https://leetcode.com/problems/unique-binary-search-trees/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/UniqueBinarySearchTrees.java) | O(n^2) | O(n) | Medium | Recursion, DP
|
| 239 | +|95|[Unique Binary Search Trees II](https://leetcode.com/problems/unique-binary-search-trees-ii/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/UniqueBinarySearchTreesII.java) | O(?) | O(?) | Medium | Recursion |
232 | 240 | |94|[Binary Tree Inorder Traversal](https://leetcode.com/problems/binary-tree-inorder-traversal/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/BinaryTreeInorderTraversal.java)| O(n)|O(h) | Medium| Binary Tree
|
233 | 241 | |92|[Reverse Linked List II](https://leetcode.com/problems/reverse-linked-list-ii/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/ReverseLinkedListII.java)| O(n)|O(1) | Medium
|
234 | 242 | |91|[Decode Ways](https://leetcode.com/problems/decode-ways/)|[Solution](../../master/leetcode-algorithms/src/main/java/com/stevesun/solutions/DecodeWays.java)| O(n)|O(n) | Medium| DP
|
|
0 commit comments