GitHub - jeantimex/javascript-problems-and-solutions: A collection of JavaScript...
source link: https://github.com/jeantimex/javascript-problems-and-solutions
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
javascript-problems-and-solutions
A collection of JavaScript problems and solutions for studying algorithms.
Table of Content
- Data Structures
- Array
- Matrix
- String
- Sorting
- Heap
- Binary Search
- Binary Indexed Tree
- Tree
- Graph
- Trie (Prefix Tree)
- Backtracking
- Breadth First Search
- Depth First Search
- Divide and Conquer
- Linked List
- Dynamic Programming
- Greedy
- Math
- Sampling
- Design
Data Structures
Problems
Array
- 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
- Wiggle Sort II
- Valid Triangle Number
- Find Anagram Mappings
- K Empty Slots
- Flatten Nested List Iterator
- Daily Temperatures
- Sliding Window Maximum
- Subarray Sum Equals K
- Maximum Product of Word Lengths
- Kth Largest Element in an Array
- Insert Interval
- Toeplitz Matrix
- Max Consecutive Ones
- Max Consecutive Ones II
- Flippling an Image
- Number of Boomerangs
- Beautiful Arrangement II
- Non-decreasing Array
Matrix
String
- 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
- Longest Absolute File Path
- Basic Calculator
- Buddy Strings
- Find the Difference
- Bulls and Cows
- Add Strings
- Reverse String II
- Longest Substring Without Repeating Characters
- Sort Characters By Frequency
- Binary Watch
- Magical String
Sorting
Heap
Binary Search
- Binary Search
- Search in Rotated Sorted Array
- Search in Rotated Sorted Array II
- Divide Two Integers
- Power(x, n)
Binary Indexed Tree
Tree
- Add One Row to Tree
- Balanced Binary Tree
- Binary Search Tree I - Search
- Binary Search Tree II - Insert
- Binary Search Tree II - Delete
- Binary Search Tree Iterator
- 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
- Count of Smaller Numbers After Self
- 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
- Kth Smallest Element in a BST
- 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
Graph
- Clone Graph
- Course Schedule
- Course Schedule II
- Alien Dictionary
- Alien Dictionary II
- 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
Trie (Prefix Tree)
- 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
Backtracking
- 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
- Expression Add Operators
Breadth First Search
Depth First Search
Divide and Conquer
Linked List
Dynamic Programming
- Longest Increasing Subsequence
- Longest Palindromic Subsequence
- Longest Palindromic Substring
- Longest Consecutive Sequence
- Regular Expression Matching
- Wildcard Matching
- Word Break
- Word Break II
- Best Time to Buy and Sell Stock
- Best Time to Buy and Sell Stock II
- Best Time to Buy and Sell Stock III
- Best Time to Buy and Sell Stock IV
- Best Time to Buy and Sell Stock with Cooldown
- Best Time to Buy and Sell Stock with Transaction Fee
- Gas Station III
- Perfect Squares
- Subset Sum Problem
- Matrix Chain Multiplication
- Burst Balloons
- Guess Number Higher or Lower II
Greedy
- Gas Station
- Gas Station II
- Queue Reconstruction by Height
- K Workers
- Remove Duplicate Letters
- Meeting Rooms II
Math
Sampling
Design
- Encode and Decode TinyURL
- LRU Cache
- LFU Cache
- Min Stack
- Max Stack
- Insert Delete GetRandom O(1)
- Moving Average from Data Stream
- Flatten 2D Vector
Author
I solve algorithm problems using JavaSript and Java, you can find all my LeetCode solutions and posts here.
Support
LICENSE
MIT License
Copyright (c) 2018 Yong Su
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.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK