Skip to content

Over 1,005+ JavaScript solutions to various LeetCode problems

License

Notifications You must be signed in to change notification settings

JoshCrozier/leetcode-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

LeetCode solutions in JavaScript

https://leetcode.com/

Table of Contents:

# Title Difficulty
1 Two Sum Easy
2 Add Two Numbers Medium
3 Longest Substring Without Repeating Characters Medium
4 Median of Two Sorted Arrays Hard
5 Longest Palindromic Substring Medium
6 ZigZag Conversion Medium
7 Reverse Integer Easy
8 String to Integer (atoi) Medium
9 Palindrome Number Easy
10 Regular Expression Matching Hard
11 Container With Most Water Medium
12 Integer to Roman Medium
13 Roman to Integer Easy
14 Longest Common Prefix Easy
15 3Sum Medium
16 3Sum Closest Medium
17 Letter Combinations of a Phone Number Medium
18 4Sum Medium
19 Remove Nth Node From End of List Medium
20 Valid Parentheses Easy
21 Merge Two Sorted Lists Easy
22 Generate Parentheses Medium
23 Merge k Sorted Lists Hard
24 Swap Nodes in Pairs Medium
25 Reverse Nodes in k-Group Hard
26 Remove Duplicates from Sorted Array Easy
27 Remove Element Easy
28 Implement strStr() Easy
29 Divide Two Integers Medium
30 Substring with Concatenation of All Words Hard
31 Next Permutation Medium
32 Longest Valid Parentheses Hard
33 Search in Rotated Sorted Array Medium
34 Find First and Last Position of Element in Sorted Array Medium
35 Search Insert Position Easy
36 Valid Sudoku Medium
37 Sudoku Solver Hard
38 Count and Say Medium
39 Combination Sum Medium
40 Combination Sum II Medium
41 First Missing Positive Hard
42 Trapping Rain Water Hard
43 Multiply Strings Medium
44 Wildcard Matching Hard
45 Jump Game II Medium
46 Permutations Medium
47 Permutations II Medium
48 Rotate Image Medium
49 Group Anagrams Medium
50 Pow(x, n) Medium
51 N-Queens Hard
52 N-Queens II Hard
53 Maximum Subarray Easy
54 Spiral Matrix Medium
55 Jump Game Medium
56 Merge Intervals Medium
57 Insert Interval Medium
58 Length of Last Word Easy
59 Spiral Matrix II Medium
60 Permutation Sequence Hard
61 Rotate List Medium
62 Unique Paths Medium
63 Unique Paths II Medium
64 Minimum Path Sum Medium
65 Valid Number Hard
66 Plus One Easy
67 Add Binary Easy
68 Text Justification Hard
69 Sqrt(x) Medium
70 Climbing Stairs Easy
71 Simplify Path Medium
72 Edit Distance Medium
73 Set Matrix Zeroes Medium
74 Search a 2D Matrix Medium
75 Sort Colors Medium
76 Minimum Window Substring Hard
77 Combinations Medium
78 Subsets Medium
79 Word Search Medium
80 Remove Duplicates from Sorted Array II Medium
81 Search in Rotated Sorted Array II Medium
82 Remove Duplicates from Sorted List II Medium
83 Remove Duplicates from Sorted List Easy
84 Largest Rectangle in Histogram Hard
85 Maximal Rectangle Hard
86 Partition List Medium
87 Scramble String Hard
88 Merge Sorted Array Easy
89 Gray Code Medium
90 Subsets II Medium
91 Decode Ways Medium
92 Reverse Linked List II Medium
93 Restore IP Addresses Medium
94 Binary Tree Inorder Traversal Easy
95 Unique Binary Search Trees II Medium
96 Unique Binary Search Trees Medium
97 Interleaving String Medium
98 Validate Binary Search Tree Medium
99 Recover Binary Search Tree Medium
100 Same Tree Easy
101 Symmetric Tree Easy
102 Binary Tree Level Order Traversal Medium
103 Binary Tree Zigzag Level Order Traversal Medium
104 Maximum Depth of Binary Tree Easy
105 Construct Binary Tree from Preorder and Inorder Traversal Medium
106 Construct Binary Tree from Inorder and Postorder Traversal Medium
107 Binary Tree Level Order Traversal II Medium
108 Convert Sorted Array to Binary Search Tree Easy
109 Convert Sorted List to Binary Search Tree Medium
110 Balanced Binary Tree Easy
111 Minimum Depth of Binary Tree Easy
112 Path Sum Easy
113 Path Sum II Medium
114 Flatten Binary Tree to Linked List Medium
115 Distinct Subsequences Hard
116 Populating Next Right Pointers in Each Node Medium
117 Populating Next Right Pointers in Each Node II Medium
118 Pascal's Triangle Easy
119 Pascal's Triangle II Easy
120 Triangle Medium
121 Best Time to Buy and Sell Stock Easy
122 Best Time to Buy and Sell Stock II Medium
123 Best Time to Buy and Sell Stock III Hard
124 Binary Tree Maximum Path Sum Hard
125 Valid Palindrome Easy
126 Word Ladder II Hard
127 Word Ladder Hard
128 Longest Consecutive Sequence Medium
129 Sum Root to Leaf Numbers Medium
130 Surrounded Regions Medium
131 Palindrome Partitioning Medium
132 Palindrome Partitioning II Hard
133 Clone Graph Medium
134 Gas Station Medium
135 Candy Hard
136 Single Number Easy
137 Single Number II Medium
138 Copy List with Random Pointer Medium
139 Word Break Medium
140 Word Break II Hard
141 Linked List Cycle Easy
142 Linked List Cycle II Medium
143 Reorder List Medium
144 Binary Tree Preorder Traversal Easy
145 Binary Tree Postorder Traversal Easy
146 LRU Cache Medium
147 Insertion Sort List Medium
148 Sort List Medium
149 Max Points on a Line Hard
150 Evaluate Reverse Polish Notation Medium
151 Reverse Words in a String Medium
152 Maximum Product Subarray Medium
153 Find Minimum in Rotated Sorted Array Medium
154 Find Minimum in Rotated Sorted Array II Hard
155 Min Stack Medium
160 Intersection of Two Linked Lists Medium
162 Find Peak Element Medium
164 Maximum Gap Medium
165 Compare Version Numbers Medium
166 Fraction to Recurring Decimal Medium
167 Two Sum II - Input Array Is Sorted Easy
168 Excel Sheet Column Title Easy
169 Majority Element Easy
171 Excel Sheet Column Number Easy
172 Factorial Trailing Zeroes Medium
173 Binary Search Tree Iterator Medium
174 Dungeon Game Hard
179 Largest Number Medium
187 Repeated DNA Sequences Medium
188 Best Time to Buy and Sell Stock IV Hard
189 Rotate Array Medium
190 Reverse Bits Easy
191 Number of 1 Bits Easy
198 House Robber Medium
199 Binary Tree Right Side View Medium
200 Number of Islands Medium
201 Bitwise AND of Numbers Range Medium
202 Happy Number Easy
203 Remove Linked List Elements Easy
204 Count Primes Medium
205 Isomorphic Strings Easy
206 Reverse Linked List Easy
207 Course Schedule Medium
208 Implement Trie (Prefix Tree) Medium
209 Minimum Size Subarray Sum Medium
210 Course Schedule II Medium
211 Design Add and Search Words Data Structure Medium
212 Word Search II Hard
213 House Robber II Medium
214 Shortest Palindrome Hard
215 Kth Largest Element in an Array Medium
216 Combination Sum III Medium
217 Contains Duplicate Easy
218 The Skyline Problem Hard
219 Contains Duplicate II Easy
220 Contains Duplicate III Hard
221 Maximal Square Medium
222 Count Complete Tree Nodes Easy
223 Rectangle Area Medium
224 Basic Calculator Hard
225 Implement Stack using Queues Easy
226 Invert Binary Tree Easy
227 Basic Calculator II Medium
228 Summary Ranges Easy
229 Majority Element II Medium
230 Kth Smallest Element in a BST Medium
231 Power of Two Easy
232 Implement Queue using Stacks Easy
233 Number of Digit One Hard
234 Palindrome Linked List Easy
235 Lowest Common Ancestor of a Binary Search Tree Easy
236 Lowest Common Ancestor of a Binary Tree Medium
237 Delete Node in a Linked List Easy
238 Product of Array Except Self Medium
239 Sliding Window Maximum Hard
240 Search a 2D Matrix II Medium
241 Different Ways to Add Parentheses Medium
242 Valid Anagram Easy
257 Binary Tree Paths Easy
258 Add Digits Easy
260 Single Number III Medium
263 Ugly Number Easy
264 Ugly Number II Medium
268 Missing Number Easy
273 Integer to English Words Hard
274 H-Index Medium
275 H-Index II Medium
278 First Bad Version Medium
279 Perfect Squares Medium
282 Expression Add Operators Hard
283 Move Zeroes Easy
284 Peeking Iterator Medium
287 Find the Duplicate Number Medium
289 Game of Life Medium
290 Word Pattern Easy
292 Nim Game Easy
295 Find Median from Data Stream Hard
297 Serialize and Deserialize Binary Tree Hard
299 Bulls and Cows Medium
300 Longest Increasing Subsequence Medium
301 Remove Invalid Parentheses Hard
303 Range Sum Query - Immutable Easy
304 Range Sum Query 2D - Immutable Medium
306 Additive Number Medium
307 Range Sum Query - Mutable Medium
309 Best Time to Buy and Sell Stock with Cooldown Medium
310 Minimum Height Trees Medium
312 Burst Balloons Hard
313 Super Ugly Number Medium
315 Count of Smaller Numbers After Self Hard
316 Remove Duplicate Letters Medium
318 Maximum Product of Word Lengths Medium
319 Bulb Switcher Medium
321 Create Maximum Number Hard
322 Coin Change Medium
324 Wiggle Sort II Medium
326 Power of Three Easy
327 Count of Range Sum Hard
328 Odd Even Linked List Medium
329 Longest Increasing Path in a Matrix Hard
330 Patching Array Hard
331 Verify Preorder Serialization of a Binary Tree Medium
332 Reconstruct Itinerary Hard
334 Increasing Triplet Subsequence Medium
335 Self Crossing Hard
336 Palindrome Pairs Hard
337 House Robber III Medium
338 Counting Bits Easy
341 Flatten Nested List Iterator Medium
342 Power of Four Easy
343 Integer Break Medium
344 Reverse String Easy
345 Reverse Vowels of a String Easy
347 Top K Frequent Elements Medium
349 Intersection of Two Arrays Easy
350 Intersection of Two Arrays II Easy
352 Data Stream as Disjoint Intervals Hard
354 Russian Doll Envelopes Hard
355 Design Twitter Medium
357 Count Numbers with Unique Digits Medium
363 Max Sum of Rectangle No Larger Than K Hard
365 Water and Jug Problem Medium
367 Valid Perfect Square Easy
368 Largest Divisible Subset Medium
371 Sum of Two Integers Medium
372 Super Pow Medium
373 Find K Pairs with Smallest Sums Medium
374 Guess Number Higher or Lower Medium
375 Guess Number Higher or Lower II Medium
376 Wiggle Subsequence Medium
377 Combination Sum IV Medium
378 Kth Smallest Element in a Sorted Matrix Medium
380 Insert Delete GetRandom O(1) Medium
381 Insert Delete GetRandom O(1) - Duplicates allowed Hard
382 Linked List Random Node Medium
383 Ransom Note Easy
384 Shuffle an Array Medium
385 Mini Parser Medium
386 Lexicographical Numbers Medium
387 First Unique Character in a String Easy
388 Longest Absolute File Path Medium
389 Find the Difference Easy
390 Elimination Game Medium
391 Perfect Rectangle Hard
392 Is Subsequence Easy
393 UTF-8 Validation Medium
394 Decode String Medium
395 Longest Substring with At Least K Repeating Characters Medium
396 Rotate Function Medium
397 Integer Replacement Medium
398 Random Pick Index Medium
399 Evaluate Division Medium
400 Nth Digit Medium
401 Binary Watch Easy
402 Remove K Digits Medium
403 Frog Jump Hard
404 Sum of Left Leaves Easy
405 Convert a Number to Hexadecimal Easy
406 Queue Reconstruction by Height Medium
407 Trapping Rain Water II Hard
409 Longest Palindrome Easy
410 Split Array Largest Sum Hard
412 Fizz Buzz Easy
413 Arithmetic Slices Medium
414 Third Maximum Number Easy
415 Add Strings Easy
416 Partition Equal Subset Sum Medium
417 Pacific Atlantic Water Flow Medium
419 Battleships in a Board Medium
420 Strong Password Checker Hard
421 Maximum XOR of Two Numbers in an Array Medium
423 Reconstruct Original Digits from English Medium
424 Longest Repeating Character Replacement Medium
427 Construct Quad Tree Medium
429 N-ary Tree Level Order Traversal Medium
430 Flatten a Multilevel Doubly Linked List Medium
432 All O`one Data Structure Hard
433 Minimum Genetic Mutation Medium
434 Number of Segments in a String Easy
435 Non-overlapping Intervals Medium
436 Find Right Interval Medium
437 Path Sum III Medium
438 Find All Anagrams in a String Medium
440 K-th Smallest in Lexicographical Order Hard
441 Arranging Coins Easy
442 Find All Duplicates in an Array Medium
443 String Compression Medium
445 Add Two Numbers II Medium
446 Arithmetic Slices II - Subsequence Hard
447 Number of Boomerangs Medium
448 Find All Numbers Disappeared in an Array Easy
449 Serialize and Deserialize BST Medium
450 Delete Node in a BST Medium
451 Sort Characters By Frequency Medium
452 Minimum Number of Arrows to Burst Balloons Medium
453 Minimum Moves to Equal Array Elements Medium
454 4Sum II Medium
455 Assign Cookies Easy
456 132 Pattern Medium
457 Circular Array Loop Medium
458 Poor Pigs Hard
459 Repeated Substring Pattern Easy
460 LFU Cache Hard
461 Hamming Distance Easy
462 Minimum Moves to Equal Array Elements II Medium
463 Island Perimeter Medium
464 Can I Win Medium
466 Count The Repetitions Hard
467 Unique Substrings in Wraparound String Medium
468 Validate IP Address Medium
470 Implement Rand10() Using Rand7() Medium
472 Concatenated Words Hard
473 Matchsticks to Square Medium
474 Ones and Zeroes Medium
475 Heaters Medium
476 Number Complement Easy
477 Total Hamming Distance Medium
478 Generate Random Point in a Circle Medium
479 Largest Palindrome Product Hard
480 Sliding Window Median Hard
481 Magical String Medium
482 License Key Formatting Easy
483 Smallest Good Base Hard
485 Max Consecutive Ones Easy
486 Predict the Winner Medium
488 Zuma Game Hard
491 Non-decreasing Subsequences Medium
492 Construct the Rectangle Easy
493 Reverse Pairs Hard
494 Target Sum Medium
495 Teemo Attacking Easy
496 Next Greater Element I Easy
497 Random Point in Non-overlapping Rectangles Medium
498 Diagonal Traverse Medium
500 Keyboard Row Easy
501 Find Mode in Binary Search Tree Easy
502 IPO Hard
503 Next Greater Element II Medium
504 Base 7 Easy
506 Relative Ranks Easy
507 Perfect Number Easy
508 Most Frequent Subtree Sum Medium
509 Fibonacci Number Easy
513 Find Bottom Left Tree Value Medium
514 Freedom Trail Hard
515 Find Largest Value in Each Tree Row Medium
516 Longest Palindromic Subsequence Medium
517 Super Washing Machines Hard
518 Coin Change II Medium
519 Random Flip Matrix Medium
520 Detect Capital Easy
521 Longest Uncommon Subsequence I Easy
522 Longest Uncommon Subsequence II Medium
523 Continuous Subarray Sum Medium
524 Longest Word in Dictionary through Deleting Medium
525 Contiguous Array Medium
526 Beautiful Arrangement Medium
528 Random Pick with Weight Medium
529 Minesweeper Medium
530 Minimum Absolute Difference in BST Easy
532 K-diff Pairs in an Array Medium
537 Complex Number Multiplication Medium
538 Convert BST to Greater Tree Medium
539 Minimum Time Difference Medium
540 Single Element in a Sorted Array Medium
541 Reverse String II Easy
542 01 Matrix Medium
543 Diameter of Binary Tree Easy
546 Remove Boxes Hard
547 Number of Provinces Medium
551 Student Attendance Record I Easy
552 Student Attendance Record II Hard
553 Optimal Division Medium
554 Brick Wall Medium
556 Next Greater Element III Medium
557 Reverse Words in a String III Easy
558 Logical OR of Two Binary Grids Represented as Quad-Trees Medium
559 Maximum Depth of N-ary Tree Easy
560 Subarray Sum Equals K Medium
563 Binary Tree Tilt Easy
564 Find the Closest Palindrome Hard
565 Array Nesting Medium
566 Reshape the Matrix Easy
567 Permutation in String Medium
572 Subtree of Another Tree Easy
575 Distribute Candies Easy
576 Out of Boundary Paths Medium
581 Shortest Unsorted Continuous Subarray Medium
583 Delete Operation for Two Strings Medium
587 Erect the Fence Hard
589 N-ary Tree Preorder Traversal Easy
590 N-ary Tree Postorder Traversal Easy
591 Tag Validator Hard
592 Fraction Addition and Subtraction Medium
593 Valid Square Medium
594 Longest Harmonious Subsequence Easy
598 Range Addition II Easy
599 Minimum Index Sum of Two Lists Easy
600 Non-negative Integers without Consecutive Ones Hard
605 Can Place Flowers Easy
606 Construct String from Binary Tree Easy
609 Find Duplicate File in System Medium
611 Valid Triangle Number Medium
617 Merge Two Binary Trees Easy
621 Task Scheduler Medium
622 Design Circular Queue Medium
623 Add One Row to Tree Medium
624 Maximum Distance in Arrays Medium
628 Maximum Product of Three Numbers Easy
629 K Inverse Pairs Array Hard
630 Course Schedule III Hard
632 Smallest Range Covering Elements from K Lists Hard
633 Sum of Square Numbers Medium
636 Exclusive Time of Functions Medium
637 Average of Levels in Binary Tree Easy
638 Shopping Offers Medium
639 Decode Ways II Hard
640 Solve the Equation Medium
641 Design Circular Deque Medium
643 Maximum Average Subarray I Easy
645 Set Mismatch Medium
646 Maximum Length of Pair Chain Medium
647 Palindromic Substrings Medium
648 Replace Words Medium
649 Dota2 Senate Medium
650 2 Keys Keyboard Medium
652 Find Duplicate Subtrees Medium
653 Two Sum IV - Input is a BST Easy
654 Maximum Binary Tree Medium
655 Print Binary Tree Medium
657 Robot Return to Origin Easy
658 Find K Closest Elements Medium
659 Split Array into Consecutive Subsequences Medium
661 Image Smoother Easy
662 Maximum Width of Binary Tree Medium
664 Strange Printer Hard
665 Non-decreasing Array Medium
667 Beautiful Arrangement II Medium
668 Kth Smallest Number in Multiplication Table Hard
669 Trim a Binary Search Tree Medium
670 Maximum Swap Medium
671 Second Minimum Node In a Binary Tree Easy
672 Bulb Switcher II Medium
673 Number of Longest Increasing Subsequence Medium
674 Longest Continuous Increasing Subsequence Easy
675 Cut Off Trees for Golf Event Hard
676 Implement Magic Dictionary Medium
677 Map Sum Pairs Medium
678 Valid Parenthesis String Medium
679 24 Game Hard
680 Valid Palindrome II Easy
682 Baseball Game Easy
684 Redundant Connection Medium
685 Redundant Connection II Hard
686 Repeated String Match Easy
687 Longest Univalue Path Medium
688 Knight Probability in Chessboard Medium
689 Maximum Sum of 3 Non-Overlapping Subarrays Hard
690 Employee Importance Medium
691 Stickers to Spell Word Hard
692 Top K Frequent Words Medium
693 Binary Number with Alternating Bits Easy
695 Max Area of Island Medium
696 Count Binary Substrings Easy
697 Degree of an Array Easy
698 Partition to K Equal Sum Subsets Medium
699 Falling Squares Hard
700 Search in a Binary Search Tree Easy
701 Insert into a Binary Search Tree Medium
703 Kth Largest Element in a Stream Easy
704 Binary Search Easy
705 Design HashSet Easy
706 Design HashMap Easy
707 Design Linked List Medium
710 Random Pick with Blacklist Hard
712 Minimum ASCII Delete Sum for Two Strings Medium
713 Subarray Product Less Than K Medium
714 Best Time to Buy and Sell Stock with Transaction Fee Medium
715 Range Module Hard
717 1-bit and 2-bit Characters Easy
718 Maximum Length of Repeated Subarray Medium
719 Find K-th Smallest Pair Distance Hard
720 Longest Word in Dictionary Medium
721 Accounts Merge Medium
722 Remove Comments Medium
724 Find Pivot Index Easy
725 Split Linked List in Parts Medium
726 Number of Atoms Hard
728 Self Dividing Numbers Easy
729 My Calendar I Medium
730 Count Different Palindromic Subsequences Hard
731 My Calendar II Medium
732 My Calendar III Hard
733 Flood Fill Easy
735 Asteroid Collision Medium
736 Parse Lisp Expression Hard
738 Monotone Increasing Digits Medium
739 Daily Temperatures Medium
740 Delete and Earn Medium
741 Cherry Pickup Hard
743 Network Delay Time Medium
744 Find Smallest Letter Greater Than Target Easy
745 Prefix and Suffix Search Hard
746 Min Cost Climbing Stairs Easy
747 Largest Number At Least Twice of Others Easy
748 Shortest Completing Word Easy
749 Contain Virus Hard
752 Open the Lock Medium
753 Cracking the Safe Hard
754 Reach a Number Medium
756 Pyramid Transition Matrix Medium
757 Set Intersection Size At Least Two Hard
761 Special Binary String Hard
762 Prime Number of Set Bits in Binary Representation Easy
763 Partition Labels Medium
764 Largest Plus Sign Medium
765 Couples Holding Hands Hard
766 Toeplitz Matrix Easy
767 Reorganize String Medium
768 Max Chunks To Make Sorted II Hard
769 Max Chunks To Make Sorted Medium
770 Basic Calculator IV Hard
773 Sliding Puzzle Hard
775 Global and Local Inversions Medium
777 Swap Adjacent in LR String Medium
778 Swim in Rising Water Hard
779 K-th Symbol in Grammar Medium
780 Reaching Points Hard
781 Rabbits in Forest Medium
782 Transform to Chessboard Hard
783 Minimum Distance Between BST Nodes Easy
784 Letter Case Permutation Medium
785 Is Graph Bipartite? Medium
786 K-th Smallest Prime Fraction Medium
787 Cheapest Flights Within K Stops Medium
788 Rotated Digits Medium
789 Escape The Ghosts Medium
790 Domino and Tromino Tiling Medium
791 Custom Sort String Medium
792 Number of Matching Subsequences Medium
793 Preimage Size of Factorial Zeroes Function Hard
794 Valid Tic-Tac-Toe State Medium
795 Number of Subarrays with Bounded Maximum Medium
796 Rotate String Easy
797 All Paths From Source to Target Medium
798 Smallest Rotation with Highest Score Hard
799 Champagne Tower Medium
801 Minimum Swaps To Make Sequences Increasing Hard
802 Find Eventual Safe States Medium
803 Bricks Falling When Hit Hard
804 Unique Morse Code Words Easy
805 Split Array With Same Average Hard
806 Number of Lines To Write String Easy
808 Soup Servings Medium
809 Expressive Words Medium
810 Chalkboard XOR Game Hard
811 Subdomain Visit Count Medium
812 Largest Triangle Area Easy
813 Largest Sum of Averages Medium
814 Binary Tree Pruning Medium
815 Bus Routes Hard
816 Ambiguous Coordinates Medium
817 Linked List Components Medium
818 Race Car Hard
819 Most Common Word Easy
820 Short Encoding of Words Medium
821 Shortest Distance to a Character Easy
822 Card Flipping Game Medium
823 Binary Trees With Factors Medium
824 Goat Latin Easy
825 Friends Of Appropriate Ages Medium
826 Most Profit Assigning Work Medium
827 Making A Large Island Hard
828 Count Unique Characters of All Substrings of a Given String Hard
829 Consecutive Numbers Sum Hard
830 Positions of Large Groups Easy
831 Masking Personal Information Medium
833 Find And Replace in String Medium
834 Sum of Distances in Tree Hard
835 Image Overlap Medium
836 Rectangle Overlap Easy
837 New 21 Game Medium
838 Push Dominoes Medium
839 Similar String Groups Hard
840 Magic Squares In Grid Medium
841 Keys and Rooms Medium
842 Split Array into Fibonacci Sequence Medium
843 Guess the Word Hard
844 Backspace String Compare Easy
845 Longest Mountain in Array Medium
846 Hand of Straights Medium
847 Shortest Path Visiting All Nodes Hard
848 Shifting Letters Medium
849 Maximize Distance to Closest Person Medium
850 Rectangle Area II Hard
851 Loud and Rich Medium
852 Peak Index in a Mountain Array Medium
853 Car Fleet Medium
854 K-Similar Strings Hard
855 Exam Room Medium
856 Score of Parentheses Medium
857 Minimum Cost to Hire K Workers Hard
858 Mirror Reflection Medium
859 Buddy Strings Easy
860 Lemonade Change Easy
861 Score After Flipping Matrix Medium
862 Shortest Subarray with Sum at Least K Hard
863 All Nodes Distance K in Binary Tree Medium
864 Shortest Path to Get All Keys Hard
865 Smallest Subtree with all the Deepest Nodes Medium
866 Prime Palindrome Medium
867 Transpose Matrix Easy
868 Binary Gap Easy
869 Reordered Power of 2 Medium
870 Advantage Shuffle Medium
871 Minimum Number of Refueling Stops Hard
872 Leaf-Similar Trees Easy
873 Length of Longest Fibonacci Subsequence Medium
874 Walking Robot Simulation Medium
875 Koko Eating Bananas Medium
876 Middle of the Linked List Easy
877 Stone Game Medium
878 Nth Magical Number Hard
879 Profitable Schemes Hard
880 Decoded String at Index Medium
881 Boats to Save People Medium
882 Reachable Nodes In Subdivided Graph Hard
883 Projection Area of 3D Shapes Easy
884 Uncommon Words from Two Sentences Easy
885 Spiral Matrix III Medium
886 Possible Bipartition Medium
887 Super Egg Drop Hard
888 Fair Candy Swap Easy
889 Construct Binary Tree from Preorder and Postorder Traversal Medium
890 Find and Replace Pattern Medium
891 Sum of Subsequence Widths Hard
892 Surface Area of 3D Shapes Easy
893 Groups of Special-Equivalent Strings Medium
894 All Possible Full Binary Trees Medium
895 Maximum Frequency Stack Hard
896 Monotonic Array Easy
897 Increasing Order Search Tree Easy
898 Bitwise ORs of Subarrays Medium
899 Orderly Queue Hard
900 RLE Iterator Medium
901 Online Stock Span Medium
902 Numbers At Most N Given Digit Set Hard
903 Valid Permutations for DI Sequence Hard
904 Fruit Into Baskets Medium
905 Sort Array By Parity Easy
906 Super Palindromes Hard
907 Sum of Subarray Minimums Medium
908 Smallest Range I Easy
909 Snakes and Ladders Medium
910 Smallest Range II Medium
911 Online Election Medium
912 Sort an Array Medium
913 Cat and Mouse Hard
914 X of a Kind in a Deck of Cards Medium
916 Word Subsets Medium
918 Maximum Sum Circular Subarray Medium
922 Sort Array By Parity II Easy
925 Long Pressed Name Easy
926 Flip String to Monotone Increasing Medium
929 Unique Email Addresses Easy
933 Number of Recent Calls Easy
937 Reorder Data in Log Files Medium
966 Vowel Spellchecker Medium
970 Powerful Integers Easy
976 Largest Perimeter Triangle Easy
977 Squares of a Sorted Array Easy
985 Sum of Even Numbers After Queries Easy
989 Add to Array-Form of Integer Easy
994 Rotting Oranges Medium
997 Find the Town Judge Easy
1002 Find Common Characters Easy
1004 Max Consecutive Ones III Medium
1005 Maximize Sum Of Array After K Negations Easy
1009 Complement of Base 10 Integer Easy
1010 Pairs of Songs With Total Durations Divisible by 60 Medium
1022 Sum of Root To Leaf Binary Numbers Easy
1023 Camelcase Matching Medium
1028 Recover a Tree From Preorder Traversal Hard
1037 Valid Boomerang Easy
1038 Binary Search Tree to Greater Sum Tree Medium
1041 Robot Bounded In Circle Medium
1047 Remove All Adjacent Duplicates In String Easy
1051 Height Checker Easy
1071 Greatest Common Divisor of Strings Easy
1079 Letter Tile Possibilities Medium
1081 Smallest Subsequence of Distinct Characters Medium
1092 Shortest Common Supersequence Hard
1103 Distribute Candies to People Easy
1108 Defanging an IP Address Easy
1122 Relative Sort Array Easy
1123 Lowest Common Ancestor of Deepest Leaves Medium
1137 N-th Tribonacci Number Easy
1143 Longest Common Subsequence Medium
1161 Maximum Level Sum of a Binary Tree Medium
1189 Maximum Number of Balloons Easy
1200 Minimum Absolute Difference Easy
1206 Design Skiplist Hard
1207 Unique Number of Occurrences Easy
1208 Get Equal Substrings Within Budget Medium
1217 Minimum Cost to Move Chips to The Same Position Easy
1232 Check If It Is a Straight Line Easy
1233 Remove Sub-Folders from the Filesystem Medium
1249 Minimum Remove to Make Valid Parentheses Medium
1252 Cells with Odd Values in a Matrix Easy
1261 Find Elements in a Contaminated Binary Tree Medium
1267 Count Servers that Communicate Medium
1268 Search Suggestions System Medium
1287 Element Appearing More Than 25% In Sorted Array Easy
1290 Convert Binary Number in a Linked List to Integer Easy
1291 Sequential Digits Medium
1292 Maximum Side Length of a Square with Sum Less than or Equal to Threshold Medium
1295 Find Numbers with Even Number of Digits Easy
1296 Divide Array in Sets of K Consecutive Numbers Medium
1297 Maximum Number of Occurrences of a Substring Medium
1304 Find N Unique Integers Sum up to Zero Easy
1309 Decrypt String from Alphabet to Integer Mapping Easy
1313 Decompress Run-Length Encoded List Easy
1317 Convert Integer to the Sum of Two No-Zero Integers Easy
1318 Minimum Flips to Make a OR b Equal to c Medium
1319 Number of Operations to Make Network Connected Medium
1323 Maximum 69 Number Easy
1324 Print Words Vertically Medium
1331 Rank Transform of an Array Easy
1332 Remove Palindromic Subsequences Easy
1333 Filter Restaurants by Vegan-Friendly, Price and Distance Medium
1342 Number of Steps to Reduce a Number to Zero Easy
1351 Count Negative Numbers in a Sorted Matrix Easy
1352 Product of the Last K Numbers Medium
1356 Sort Integers by The Number of 1 Bits Easy
1358 Number of Substrings Containing All Three Characters Medium
1360 Number of Days Between Two Dates Easy
1365 How Many Numbers Are Smaller Than the Current Number Easy
1366 Rank Teams by Votes Medium
1368 Minimum Cost to Make at Least One Valid Path in a Grid Hard
1372 Longest ZigZag Path in a Binary Tree Medium
1374 Generate a String With Characters That Have Odd Counts Easy
1380 Lucky Numbers in a Matrix Easy
1389 Create Target Array in the Given Order Easy
1400 Construct K Palindrome Strings Medium
1402 Reducing Dishes Hard
1408 String Matching in an Array Easy
1410 HTML Entity Parser Medium
1415 The k-th Lexicographical String of All Happy Strings of Length n Medium
1431 Kids With the Greatest Number of Candies Easy
1436 Destination City Easy
1437 Check If All 1's Are at Least Length K Places Away Easy
1443 Minimum Time to Collect All Apples in a Tree Medium
1446 Consecutive Characters Easy
1447 Simplified Fractions Medium
1448 Count Good Nodes in Binary Tree Medium
1450 Number of Students Doing Homework at a Given Time Easy
1451 Rearrange Words in a Sentence Medium
1455 Check If a Word Occurs As a Prefix of Any Word in a Sentence Easy
1456 Maximum Number of Vowels in a Substring of Given Length Medium
1460 Make Two Arrays Equal by Reversing Sub-arrays Easy
1462 Course Schedule IV Medium
1464 Maximum Product of Two Elements in an Array Easy
1466 Reorder Routes to Make All Paths Lead to the City Zero Medium
1470 Shuffle the Array Easy
1472 Design Browser History Medium
1475 Final Prices With a Special Discount in a Shop Easy
1480 Running Sum of 1d Array Easy
1481 Least Number of Unique Integers after K Removals Medium
1486 XOR Operation in an Array Easy
1491 Average Salary Excluding the Minimum and Maximum Salary Easy
1492 The kth Factor of n Medium
1493 Longest Subarray of 1's After Deleting One Element Medium
1496 Path Crossing Easy
1502 Can Make Arithmetic Progression From Sequence Easy
1507 Reformat Date Easy
1512 Number of Good Pairs Easy
1519 Number of Nodes in the Sub-Tree With the Same Label Medium
1524 Number of Sub-arrays With Odd Sum Medium
1528 Shuffle String Easy
1535 Find the Winner of an Array Game Medium
1550 Three Consecutive Odds Easy
1551 Minimum Operations to Make Array Equal Medium
1566 Detect Pattern of Length M Repeated K or More Times Easy
1576 Replace All ?'s to Avoid Consecutive Repeating Characters Medium
1598 Crawler Log Folder Easy
1657 Determine if Two Strings Are Close Medium
1668 Maximum Repeating Substring Easy
1669 Merge In Between Linked Lists Medium
1672 Richest Customer Wealth Easy
1679 Max Number of K-Sum Pairs Medium
1716 Calculate Money in Leetcode Bank Easy
1718 Construct the Lexicographically Largest Valid Sequence Medium
1726 Tuple with Same Product Medium
1732 Find the Highest Altitude Easy
1748 Sum of Unique Elements Easy
1749 Maximum Absolute Sum of Any Subarray Medium
1752 Check if Array Is Sorted and Rotated Easy
1764 Form Array by Concatenating Subarrays of Another Array Medium
1765 Map of Highest Peak Medium
1768 Merge Strings Alternately Easy
1769 Minimum Number of Operations to Move All Balls to Each Box Medium
1780 Check if Number is a Sum of Powers of Three Medium
1790 Check if One String Swap Can Make Strings Equal Easy
1791 Find Center of Star Graph Easy
1800 Maximum Ascending Subarray Sum Easy
1812 Determine Color of a Chessboard Square Easy
1817 Finding the Users Active Minutes Medium
1832 Check if the Sentence Is Pangram Easy
1833 Maximum Ice Cream Bars Medium
1880 Check if Word Equals Summation of Two Words Easy
1886 Determine Whether Matrix Can Be Obtained By Rotation Easy
1910 Remove All Occurrences of a Substring Medium
1920 Build Array from Permutation Easy
1926 Nearest Exit from Entrance in Maze Medium
1929 Concatenation of Array Easy
1930 Unique Length-3 Palindromic Subsequences Medium
1935 Maximum Number of Words You Can Type Easy
1976 Number of Ways to Arrive at Destination Medium
1980 Find Unique Binary String Medium
1985 Find the Kth Largest Integer in the Array Medium
1996 The Number of Weak Characters in the Game Medium
2000 Reverse Prefix of Word Easy
2011 Final Value of Variable After Performing Operations Easy
2016 Maximum Difference Between Increasing Elements Easy
2017 Grid Game Medium
2027 Minimum Moves to Convert String Easy
2037 Minimum Number of Moves to Seat Everyone Easy
2047 Number of Valid Words in a Sentence Easy
2053 Kth Distinct String in an Array Medium
2085 Count Common Words With One Occurrence Easy
2095 Delete the Middle Node of a Linked List Medium
2099 Find Subsequence of Length K With the Largest Sum Medium
2114 Maximum Number of Words Found in Sentences Easy
2115 Find All Possible Recipes from Given Supplies Medium
2116 Check if a Parentheses String Can Be Valid Medium
2127 Maximum Employees to Be Invited to a Meeting Hard
2129 Capitalize the Title Easy
2130 Maximum Twin Sum of a Linked List Medium
2154 Keep Multiplying Found Values by Two Easy
2161 Partition Array According to Given Pivot Medium
2185 Counting Words With a Given Prefix Easy
2206 Divide Array Into Equal Pairs Easy
2215 Find the Difference of Two Arrays Easy
2226 Maximum Candies Allocated to K Children Medium
2235 Add Two Integers Easy
2244 Minimum Rounds to Complete All Tasks Medium
2270 Number of Ways to Split Array Medium
2300 Successful Pairs of Spells and Potions Medium
2336 Smallest Number in Infinite Set Medium
2342 Max Sum of a Pair With Equal Sum of Digits Medium
2349 Design a Number Container System Medium
2352 Equal Row and Column Pairs Medium
2364 Count Number of Bad Pairs Medium
2375 Construct Smallest Number From DI String Medium
2379 Minimum Recolors to Get K Consecutive Black Blocks Easy
2381 Shifting Letters II Medium
2390 Removing Stars From a String Medium
2396 Strictly Palindromic Number Medium
2401 Longest Nice Subarray Medium
2413 Smallest Even Multiple Easy
2425 Bitwise XOR of All Pairings Medium
2427 Number of Common Factors Easy
2429 Minimize XOR Medium
2460 Apply Operations to an Array Easy
2462 Total Cost to Hire K Workers Medium
2467 Most Profitable Path in a Tree Medium
2469 Convert the Temperature Easy
2482 Difference Between Ones and Zeros in Row and Column Medium
2490 Circular Sentence Easy
2493 Divide Nodes Into the Maximum Number of Groups Hard
2523 Closest Prime Numbers in Range Medium
2529 Maximum Count of Positive Integer and Negative Integer Easy
2535 Difference Between Element Sum and Digit Sum of an Array Easy
2542 Maximum Subsequence Score Medium
2559 Count Vowel Strings in Ranges Medium
2560 House Robber IV Medium
2570 Merge Two 2D Arrays by Summing Values Easy
2579 Count Total Number of Colored Cells Medium
2594 Minimum Time to Repair Cars Medium
2618 Check if Object Instance of Class Medium
2619 Array Prototype Last Easy
2620 Counter Easy
2621 Sleep Easy
2622 Cache With Time Limit Medium
2623 Memoize Medium
2625 Flatten Deeply Nested Array Medium
2626 Array Reduce Transformation Easy
2627 Debounce Medium
2629 Function Composition Easy
2630 Memoize II Hard
2631 Group By Medium
2634 Filter Elements from Array Easy
2635 Apply Transform Over Each Element in Array Easy
2637 Promise Time Limit Medium
2648 Generate Fibonacci Sequence Easy
2649 Nested Array Generator Medium
2650 Design Cancellable Function Hard
2657 Find the Prefix Common Array of Two Arrays Medium
2658 Maximum Number of Fish in a Grid Medium
2661 First Completely Painted Row or Column Medium
2665 Counter II Easy
2666 Allow One Function Call Easy
2667 Create Hello World Function Easy
2677 Chunk Array Easy
2683 Neighboring Bitwise XOR Medium
2685 Count the Number of Complete Components Medium
2693 Call Function with Custom Context Medium
2694 Event Emitter Medium
2695 Array Wrapper Easy
2698 Find the Punishment Number of an Integer Medium
2703 Return Length of Arguments Passed Easy
2704 To Be Or Not To Be Easy
2705 Compact Object Medium
2715 Timeout Cancellation Easy
2721 Execute Asynchronous Functions in Parallel Medium
2722 Join Two Arrays by ID Medium
2723 Add Two Promises Easy
2724 Sort By Easy
2725 Interval Cancellation Easy
2726 Calculator with Method Chaining Easy
2727 Is Object Empty Easy
2948 Make Lexicographically Smallest Array by Swapping Elements Medium
2965 Find Missing and Repeated Values Easy
3042 Count Prefix and Suffix Pairs I Easy
3066 Minimum Operations to Exceed Threshold Value II Medium
3105 Longest Strictly Increasing or Strictly Decreasing Subarray Easy
3108 Minimum Cost Walk in Weighted Graph Hard
3110 Score of a String Easy
3151 Special Array I Easy
3160 Find the Number of Distinct Colors Among the Balls Medium
3169 Count Days Without Meetings Medium
3174 Clear Digits Easy
3191 Minimum Operations to Make Binary Array Elements Equal to One I Medium
3208 Alternating Groups II Medium
3223 Minimum Length of String After Operations Medium
3306 Count of Substrings Containing Every Vowel and K Consonants II Medium
3356 Zero Array Transformation II Medium
3392 Count Subarrays of Length Three With a Condition Easy
3396 Minimum Number of Operations to Make Elements in Array Distinct Easy
3397 Maximum Number of Distinct Elements After Operations Medium
3402 Minimum Operations to Make Columns Strictly Increasing Easy
3452 Sum of Good Numbers Easy
3461 Check If Digits Are Equal in String After Operations I Easy
3462 Maximum Sum With at Most K Elements Medium
3463 Check If Digits Are Equal in String After Operations II Hard

License

MIT License

Copyright (c) 2019-2025 Josh Crozier