LeetCode JavaScript Solutions
A collection of 2,750 elegant solutions to LeetCode problems.
All 2750 Array 1577 String 680 Hash Table 583 Math 482 Dynamic Programming 457 Sorting 382 Greedy 348 Depth-First Search 293 Binary Search 240 Tree 227 Breadth-First Search 224 Matrix 220 Two Pointers 200 Bit Manipulation 195 Binary Tree 175 Prefix Sum 157 Stack 154 Heap Priority Queue 150 Simulation 149 Counting 134 Graph 133 Design 120 Sliding Window 112 Backtracking 104 Union Find 79 Linked List 78 Enumeration 76 Ordered Set 58 Monotonic Stack 55 Trie 51 Number Theory 47 Recursion 45 Divide and Conquer 45 Bitmask 41 Binary Search Tree 40 Queue 39 Segment Tree 37 Memoization 36 Geometry 36 Combinatorics 35 Topological Sort 33 Hash Function 30 Binary Indexed Tree 27 Game Theory 25 String Matching 23 Shortest Path 23 Interactive 23 Rolling Hash 22 Data Stream 20 Brainteaser 14 Monotonic Queue 13 Randomized 12 Merge Sort 12 Doubly-Linked List 11 Counting Sort 10 Iterator 9 Probability and Statistics 7 Quickselect 7 Suffix Array 6 Bucket Sort 6 Line Sweep 5 Minimum Spanning Tree 5 Reservoir Sampling 4 Strongly Connected Component 3 Eulerian Circuit 3 Radix Sort 3 Rejection Sampling 2 Biconnected Component 1