This is leetcode solution in Java with eplaination and generalization.
# | Title | Solution | Difficulty | Source Code |
---|---|---|---|---|
# | Title | Solution | Difficulty | Source Code |
---|---|---|---|---|
# | Title | Solution | Difficulty | Source Code |
---|---|---|---|---|
5 | Longest Palindromic Substring | dp | Medium | LongestPalindromicSubstring.java |
62 | Unique Paths | dp | Medium | UniquePaths.java |
63 | Unique Paths II | dp | Medium | UniquePathsII.java |
# | Title | Solution | Difficulty | Source Code |
---|---|---|---|---|
146 | LRU Cache | HashMap + Double LinkedNode | Medium | LRUCache.java |
155 | Min Stack | Single LinkedNode or Stack(Java API) | easy | MinStack.java |
173 | Binary Search Tree Iterator | stack + preorder traversal | Medium | BinarySearchTreeIterator.java |
208 | Implement Trie (Prefix Tree) | array | Medium | ImplementTrie.java |
211 | Add and Search Word - Data structure design | Medium | AddAndSearchWord.java |