/leetcode-javascript

Leetcode Solution using Javascript

Primary LanguageJavaScript

Leetcode Problems and interview problems in Javascript

  • 10 Regular Expresion Matching.js
  • 100 Same Tree.js
  • 101 Symmetric Tree.js
  • 102 Binary Tree Level Order Traversal.js
  • 103 Binary Tree Zigzag Level Order Traversal.js
  • 104 Maximum Depth of Binary Tree.js
  • 105 Construct Binary Tree from Preorder and Inorder Traversal.js
  • 106 Construct Binary Tree from Inorder and Postorder Traversal.js
  • 107 Binary Tree Level Order Traversal II.js
  • 108 Convert Sorted Array to Binary Search Tree.js
  • 11 Container With Most Water.js
  • 110 Balanced Binary Tree.js
  • 111 Minimum Depth of Binary Tree.js
  • 112 Path Sum.js
  • 114 Flatten Binary Tree to Linked List.js
  • 116 Populating Next Right Pointers in Each Node.js
  • 117 Populating Next Right Pointer.js
  • 117 Populating Next Right Pointers in Each Node II.js
  • 118 Pascal's Triangle.js
  • 119 Pascal's Triangle II.js
  • 12 Integer to Roman.js
  • 120 Triangle.js
  • 121 Best Time to Buy and Sell Stock.js
  • 122 Best Time to Buy and Sell Stock II.js
  • 123 Best Time to Buy and Sell Stock III.js
  • 124 Binary Tree Maximum Path Sum.js
  • 125 Valid Palindrome.js
  • 126 Word Ladder II.js
  • 127 Word Ladder.js
  • 129 Sum Root to Leaf Numbers.js
  • 13 Roman to Integer.js
  • 131 Palindrome Partitioning.js
  • 133 Clone Graph.js
  • 136 Single Number.js
  • 137 Single Number II.js
  • 138 Copy List With Random Pointer.js
  • 139 Word Break.js
  • 14 Longest Common Prefix.js
  • 140 Word Break II.js
  • 141 Linked List Cycle.js
  • 144 Binary Tree Preorder Traversal My Submissions Question.js
  • 145 Binary Tree Post Order Traversal.js
  • 146 LRU Cache.js
  • 148 Sort List.js
  • 149 Max Points on a Line.js
  • 15 3Sum.js
  • 150 Evaluate Reverse Polish Notation.js
  • 151 Reverse Words in a String.js
  • 152 Maximum Product Subarray.js
  • 153 Find Minimum in Rotated Sorted Array.js
  • 155 Min Stack.js
  • 156 Binary Tree Upside Down.js
  • 159 Longest Substring with At Most Two Disctinct Characters.js
  • 16 3Sum Closest.js
  • 160 Intersection Of Two Linked Lists.js
  • 161 One Edit Distance.js
  • 162 Find Peak Element.js
  • 165 Compare Version Numbers.js
  • 166 Fraction to Recurring Decimal.js
  • 168 Excel Sheet Column Title.js
  • 169 Majority Element.js
  • 17 Letter Combinations of a Phone Number.js
  • 170 Two Sum III - Data structure design.js
  • 171 Excel Sheet Column Number.js
  • 172 Factorial Trailing Zeroes.js
  • 173 Binary Search Tree Iterator.js
  • 179 Largest Number.js
  • 186 Reverse Words in a String II.js
  • 187 Repeated DNA Sequences.js
  • 188 Best Time to Buy and Sell Stock IV.js
  • 189 Rotate Array.js
  • 19 Remove Nth Node From End of List.js
  • 190 Reverse Bits.js
  • 191 Number of 1 Bits.js
  • 198 House Robber.js
  • 199 Binary Tree Right Side View.js
  • 2 Add Two Numbers.js
  • 20 Valid Parentheses.js
  • 200 Number of Islands.js
  • 201 Bitwise AND of Numbers Range.js
  • 202 Happy Number.js
  • 203 Remove Linked List Elements.js
  • 204 Count Primes.js
  • 205 Isomorphic Strings.js
  • 206 Reverse Linked List.js
  • 207 Course Schedule.js
  • 208 Implement Trie (Prefix Tree).js
  • 209 Minimum Size Subarray Sum.js
  • 21 Merge Two Sorted Lists.js
  • 210 Course Schedule II.js
  • 211 Add and Search Word - Data structure design.js
  • 212 Word Search II.js
  • 213 House Robber II.js
  • 215 Kth Largest Element in an Array.js
  • 215 Kth Largest Element in an Array.py
  • 217 Contain Duplicate.js
  • 219 Contains Duplicate II.js
  • 22 Generate Parentheses.js
  • 220 Contains Duplicate III.js
  • 221 Maximal Square.js
    1. Count Complete Tree Nodes.js
  • 223 Rectangle Area.js
  • 224 Basic Calculator.js
  • 225 Implement Stack Using Queues.js
  • 226 Invert Binary Tree.js
  • 228 Summary Ranges.js
  • 229 Majority Element II.js
  • 23 Merge k Sorted Lists.js
  • 231 Power of Two.js
  • 232 Implement Queue using Stacks.js
  • 233 Number of Digit One.js
  • 234 Palindrome Linked List.js
  • 235 Lowest Common Ancestor Of a Binary Search Tree.js
  • 236 Lowest Common Ancestor of a Binary Tree.js
  • 237 Delete Node in a Linked List.js
  • 238 Product of Array Except Self.js
  • 239 Sliding Window Maximum.js
  • 24 Swap nodes in Pairs.js
  • 240 Search a 2D Matrix II.js
  • 241 Different Ways to Add Parentheses.js
  • 242 Valid Anagram.js
  • 243 Shortest Word Distance.js
  • 244 Shortest Word Distance II.js
  • 245 Shortest Word Distance III.js
  • 249 Group Shifted Strings.js
  • 25 Reverse Nodes in k-Group.js
  • 252 Meeting Rooms.js
  • 253 Meeting Rooms II.js
  • 254 Factor Combinations.js
  • 256 Paint House.js
  • 257 Binary Tree Paths.js
  • 26 Remove Duplicates from Sorted Array.js
  • 261 Graph Valid Tree.js
  • 263 Ugly Number.js
  • 264 Ugly Number II.js
  • 265 Paint House II.js
  • 266 Palindrome Permutation.js
  • 268 Missing Number.js
  • 269 Alien Dictionary.js
  • 27 Remove Element.js
  • 277 Find the Celebrity.js
  • 278 First Bad Version.js
    1. Perfect Squares.js
  • 28 Implement strStr().js
  • 283 Move Zeroes.js
  • 285 Inorder Successor in BST.js
  • 286 Walls and Gates.js
    1. Game of Life.js
  • 293 Flip Game.js
  • 294 Flip Game II.js
  • 295 Find Median From Data Stream.js
  • 296 Best Meeting Point.js
  • 297 Serialize and Deserialize Binary Tree My Submissions Question.js
  • 3 Longest Substring Without Repeating Characters.js
  • 300 Longest Increasing Subsequence.js
  • 301 Remove Invalid Parentheses.js
  • 307 Range Sum Query - Mutable.js
  • 31 Next Permutation.js
  • 314 Binary Tree Vertical Order Traversal.js
  • 317 Shortest Distance From All Buildings.js
  • 318 Maximum Product of Word Lengths My Submissions Question.js
  • 320 Generalized Abbreviation.js
  • 322 Coin Change.js
  • 33 Search in Rotated Sorted Array.js
  • 334 Increasing Triplet Subsequence.js
  • 335 Self Crossing.js
  • 337 House Robber III.js
  • 338 Count Bits.js
  • 339 Nested List Weight Sum.js
  • 34 Search for a Range.js
  • 340 Longest Substring With At Most K Distinct Characters.js
  • 341 Flatten Nested List Iterator.js
    1. Design Tic-Tac-Toe.java
  • 349 Intersection of Two Arrays.js
  • 35 Search Insert Position.js
  • 350 Intersection of Two Arrays II.js
  • 353 Design Snake Game.js
  • 36 Valid Sudoku.js
  • 364 Nested List Weight Sum II.js
  • 366 Find Leaves of Binary Tree.js
  • 367 Valid Perfect Square.js
  • 37 Sudoku Solver.js
  • 371 Sum of Two Integers.js
  • 38 Count and Say.js
  • 39 Combination Sum.js
    1. Median of Two Sorted Arrays.js
  • 40 combination Sum II.js
  • 42 Trapping Rain Water.js
  • 43 Multiply Strings.js
  • 45 Jump Game II.js
  • 46 Permutations.js
  • 47 Permutations II.js
  • 48 Rotate Image.js
  • 49 Anagrams.js
  • 49 Group Anagrams.js
  • 5 Longest Palindromic Substring.js
  • 50 Pow(x, n).js
  • 51 N-Queens.js
  • 53 Maximum Subarray.js
  • 54 Spiral Matrix.js
  • 55 Jump Game.js
    1. Merge Intervals.js
    1. Insert Interval.js
  • 58 Length of Last Word.js
  • 59 Spiral Matrix II.js
  • 61 Rotate List.js
  • 62 Unique Paths.js
  • 63 Unique Paths II.js
  • 64 Minimum Path Sum.js
  • 65 Valid Number.js
  • 66 Plus One.js
  • 67 Add Binary.js
  • 68 Text Justification.js
  • 69 Sqrt(x).js
  • 70 Climbing Stairs.js
  • 71 Simplify Path.js
  • 72 Edit Distance.js
  • 74 Search a 2D Matrix.js
  • 75 Sort Colors.js
  • 76 Minimum Window Substring.js
  • 77 Combinations.js
  • 78 Subsets.js
  • 79 Word Search.js
  • 8 String to Integer (atoi).js
  • 80 Remove Duplicates from Sorted Array II.js
  • 81 Search in Rotated Sorted Array II.js
  • 82 Remove Duplicates from Sorted List II.js
  • 83 Remove Duplicates from Sorted List.js
  • 84 Largest Rectangle in Histogram.js
  • 85 Maximal Rectangle.js
  • 86 Partition List.js
  • 88 Merge Sorted Array.js
  • 89 Gray Code.js
  • 9 Palindrome Number.js
  • 90 Subsets II.js
  • 91 Decode Ways.js
  • 92 Reverse Linked List II.js
  • 93 Restore IP Addresses.js
  • 94 Binary Tree Inorder Traversal.js
  • 95 Unique Binary Search Trees II.js
  • 96 Unique Binary Search Trees.js
  • 98 Validate Binary Search Tree.js
  • Basic Calculator II.js
  • Basic Calculator III.js
  • Bean Probability.js
  • Can Win.js
  • Conjuct Names With Limit.js
  • Convert Binary Search Tree To Doubly Linked List.js
  • Convert Infix to Reverse Polish Notation.js
  • Custom Tree Problem.js
  • Data Structure Max Heap.js
  • Data Structure Min Heap.js
  • Disambiguos Actors.js
  • Find Duplicate Files.js
  • Javascript Closure Questions.js
  • Log Hits.js
  • Longest Common Subsequence.js
  • Matrix Diagonal Traversal.js
  • Maximum Sum Rectangular Submatrix in Matrix Dynamic Programming:2D.js
  • Merge Two Lists Into Sorted List.js
  • Min CPU Count.js
  • Parse HTML.js
  • Parse Log Top k Longest Running Job.js
  • Parse String Into Array.js
  • README.md
  • Ransom Note From Magazine.js
  • Rate Limiter.js
  • Reverse Integer.js
  • Snake And Ladder.js
  • String Encoding and Decoding.js
  • Top k Longest Running Job.js
  • URL shortening.js
  • Weighted Job Scheduling.js
  • ZigZag Conversion.js
  • find kth element in two arrays.js
  • flatten nested array.js