A collection of JavaScript problems and solutions for studying algorithms.
- Median of Two Sorted Arrays
- Plus One
- Trapping Rain Water
- Merge Intervals
- Spiral Matrix
- Summary Ranges
- Find All Numbers Disappeared in an Array
- Game of Life
- Next Permutation
- Find Peak Element
- Wiggle Sort
- Valid Triangle Number
- Regular Expression Matching
- Letter Combinations of a Phone Number
- Valid Parentheses
- Generate Parentheses
- Generate Parentheses II
- Shortest Palindrome
- Palindrome Pairs
- First Unique Character in a String
- Judge Route Circle
- Reverse Vowels of a String
- Add Bold Tag in String
- Minimum Window Substring
- Add One Row to Tree
- Balanced Binary Tree
- Binary Search Tree I - Search
- Binary Search Tree II - Insert
- Binary Search Tree II - Delete
- Binary Tree Inorder Traversal
- Binary Tree Level Order Traversal
- Binary Tree Longest Consecutive Sequence
- Binary Tree Longest Consecutive Sequence II
- Binary Tree Maximum Path Sum
- Binary Tree Paths
- Binary Tree Postorder Traversal
- Binary Tree Preorder Traversal
- Binary Tree Upside Down
- Binary Tree Zigzag Level Order Traversal
- Closest Binary Search Tree Value
- Closest Binary Search Tree Value II
- Construct Binary Tree From Preorder and Inorder Traversal
- Construct Binary Tree From Postorder and Inorder Traversal
- Convert BST to Greater Tree
- Convert Sorted Array to Binary Search Tree
- Count Univalue Subtrees
- Delete Node in a BST
- Diameter of Binary Tree
- Find Bottom Left Tree Value
- Find Largest Value in Each Tree Row
- Find Mode in Binary Search Tree
- Flatten Binary Tree to Linked List
- House Robber III
- Inorder Predecessor in BST
- Inorder Successor in BST
- K-th ancestor of a node in Binary Tree
- Kill Process
- Longest Univalue Path
- Lowest Common Ancestor of A Binary Search Tree
- Lowest Common Ancestor of a Binary Tree
- Maximum Binary Tree
- Maximum Depth of Binary Tree
- Maximum Width of Binary Tree
- Minimum Depth of Binary Tree
- Most Frequent Subtree Sum
- Path Sum
- Path Sum II
- Path Sum III
- Path Sum IV
- Populating Next Right Pointers in Each Node
- Populating Next Right Pointers in Each Node II
- Recover Binary Search Tree
- Same Tree
- Serialize and Deserialize BST
- Serialize and Deserialize Binary Tree
- Subtree of Another Tree
- Sum Root to Leaf Numbers
- Symmetric Tree
- Trim a Binary Search Tree
- Unique Binary Search Trees
- Unique Binary Search Trees II
- Univalue Tree
- Validate Binary Search Tree
- Verify Preorder Sequence in Binary Search Tree
- Clone Graph
- Course Schedule
- Course Schedule II
- Alien Dictionary
- Graph Valid Tree
- Number of Connected Components in an Undirected Graph
- Reconstruct Itinerary
- Evaluate Division
- Sequence Reconstruction
- Minimum Height Trees
- Redundant Connection
- Redundant Connection II
- Implement Trie (Prefix Tree)
- Add and Search Word
- Word Search II
- Longest Word in Dictionary
- Map Sum Pairs
- Implement Magic Dictionary
- Replace Words
- Top K Frequent Words
- Concatenated Words
- Palindrome Pairs
- Design Search Autocomplete System
- Word Squares
- Maximum XOR of Two Numbers in an Array
- Add Bold Tag in String
- Subsets
- Subsets II
- Combinations
- Combination Sum
- Combination Sum II
- Combination Sum III
- Permutations
- Permutations II
- N-Queens
- N-Queens II
- Generate Parentheses
- Generate Parentheses II
- Word Search
- Word Search II
- Sudoku Solver
- Regular Expression Matching
- Wildcard Matching
- Letter Combinations of a Phone Number
- Letter Case Permutation
- Count Numbers with Unique Digits
- Restore IP Addresses
- Longest Increasing Subsequence
- Longest Palindromic Subsequence
- Longest Palindromic Substring
- Longest Consecutive Sequence
- Regular Expression Matching
- Wildcard Matching
- Word Break
- Word Break II
I solve algorithm problems using JavaSript and Java, you can find all my LeetCode solutions and posts here.
MIT License
Copyright (c) 2017 Yong Su @jeantimex
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.