Skip to content

mustafah15/leetcode.js

Repository files navigation

leetcode JavaScript Solutions

problem on leet code solution tags youtube video
110. Balanced Binary Tree solution easy, bfs, trees
102. Binary Tree Level Order Traversal solution Medium, bfs, trees
107. Binary Tree Level Order Traversal II solution easy, bfs, trees
101. Symmetric Tree solution easy, dfs, trees
103. Binary Tree Zigzag Level Order Traversal solution Medium, bfs, trees
199. Binary Tree Right Side View solution Medium, bfs, trees
111. Minimum Depth of Binary Tree solution Easy, dfs, trees
112. Path Sum solution Easy, bfs, trees
113. Path Sum II solution Medium, bfs, backtrack, trees
114. Flatten Binary Tree to Linked List solution Medium, bfs, trees
100. Same Tree solution Easy, trees, bfs
110. Balanced Binary Tree solution easy, tree, dfs
1. Two Sum solution Easy, HashTable
136. Single Number solution Easy, HashTable
202. Happy Number solution Easy, Math, HashTable
217. Contains Duplicate solution Easy, HashTable, Sets
219. Contains Duplicate II solution Easy, HashTable
1207. Unique Number of Occurrences solution Easy, HashTable
13. Roman to Integer solution Easy, Strings
151. Reverse Words in a String solution Medium, Strings
14. Longest Common Prefix solution Easy, Strings
67. Add Binary solution Easy, Strings
22. Generate Parentheses solution Medium, Backtrack, Strings
53. Maximum Subarray solution Easy, Dynamic Programming
121. Best Time to Buy and Sell Stock solution Easy, Dynamic Programming
122. Best Time to Buy and Sell Stock II solution Easy, Dynamic Programming
62. Unique Paths solution Medium, Dynamic Programming
120. Triangle solution Medium, Dynamic Programming
300. Longest Increasing Subsequence solution 1, solution 2 Medium, Dynamic Programming
322. Coin Change solution Medium, Dynamic Programming
518. Coin Change 2 solution Medium, Dynamic Programming https://youtu.be/b-8MBeJBk8Q
72. Edit Distance solution Hard, Dynamic Programming https://youtu.be/PzKkjix7Mhk
1402. Reducing Dishes solution Hard, Dynamic Programming
49. Group Anagrams solution Medium, HashTable
283. Move Zeroes solution Easy, Array
844. Backspace String Compare solution Easy, String, Stack
155. Min Stack solution Easy, Array, Stack
543. Diameter of Binary Tree solution Easy, Trees, DFS
5. Longest Palindromic Substring solution Medium, Strings
144. Binary Tree Preorder Traversal solution Medium, dfs, trees
94. Binary Tree Inorder Traversal solution Medium, dfs, trees
739. Daily Temperatures solution Medium, Stack, Arrays
3. Longest Substring Without Repeating Characters solution Medium, String, Arrays
2. Add Two Numbers solution Medium, LinkedList
46. Permutations solution Medium, Backtracking https://youtu.be/o_U2ctVnH2g
47. Permutations II solution Medium, Backtracking https://youtu.be/F30kIMXls9U
39. Combination Sum solution Medium, Backtracking https://youtu.be/2kWl_LRrUEc
40. Combination Sum II solution Medium, Backtracking https://youtu.be/2kWl_LRrUEc
216. Combination Sum III solution Medium, Backtracking
51. N-Queens solution Hard, Backtracking https://youtu.be/4gS86fJHBbg
52. N-Queens II solution Hard, Backtracking https://youtu.be/4gS86fJHBbg
230. Kth Smallest Element in a BST solution Medium, Binary Search Tree, dfs
56. Merge Intervals solution Medium, Arrays
133. Clone Graph solution Medium, Graph
841. Keys and Rooms solution Medium, Graph
797. All Paths From Source to Target solution Medium, Graph, Backtracking https://youtu.be/2nU4OxMovOY
17. Letter Combinations of a Phone Number solution Medium, Graph, Backtracking
242. Valid Anagram solution Easy, Hash Table, string
704. Binary Search solution Easy, Binary search
1768. Merge Strings Alternately solution Easy, Arrays
1431. Kids With the Greatest Number of Candies solution Easy, Arrays
1071. Greatest Common Divisor of Strings solution Easy, Strings
128. Longest Consecutive Sequence solution Medium, Array
347. Top K Frequent Elements solution Medium, Hash table
238. Product of Array Except Self solution Medium, Array
125. Valid Palindrome solution Easy, String, TwoPointers
167. Two Sum II - Input Array Is Sorted solution Easy, BinarySearch, TwoPointers
11. Container With Most Water solution Medium, Greedy, TwoPointers
15. 3Sum solution Medium, Sorting, TwoPointers