/Leetcode

Leetcode problems & solutions

Primary LanguageJavaScriptMIT LicenseMIT

LeetCode

GitHub license

LeetCode Algorithms

# Title Solution Difficulty
2974 Minimum Number Game JavaScript Easy
1848 Minimum Distance to the Target Element JavaScript Easy
1839 Longest Substring Of All Vowels in Order JavaScript Medium
1452 People Whose List of Favorite Companies Is Not a Subset of Another List JavaScript Medium
1451 Rearrange Words in a Sentence JavaScript Medium
1450 Number of Students Doing Homework at a Given Time JavaScript Easy
1446 Consecutive Characters JavaScript Easy
1379 Find a Corresponding Node of a Binary Tree in a Clone of That Tree JavaScript Medium
1344 Angle Between Hands of a Clock JavaScript Medium
1290 Convert Binary Number in a Linked List to Integer JavaScript Easy
1288 Remove Covered Intervals JavaScript Medium
1089 Duplicate Zeros JavaScript Easy
1071 Greatest Common Divisor of Strings JavaScript Easy
1047 Remove All Adjacent Duplicates In String JavaScript Easy
1046 Last Stone Weight JavaScript Easy
1038 Binary Search Tree to Greater Sum Tree JavaScript Medium
1021 Remove Outermost Parentheses JavaScript Easy
1019 Next Greater Node In Linked List JavaScript & JavaScript Recursion Medium
1009 Complement of Base 10 Integer JavaScript Easy
1008 Construct Binary Search Tree from Preorder Traversal JavaScript Medium
1002 Find Common Characters JavaScript Easy
989 Add to Array-Form of Integer JavaScript Easy
986 Interval List Intersections JavaScript Medium
977 Squares of a Sorted Array JavaScript Easy
965 Univalued Binary Tree JavaScript Easy
961 N-Repeated Element in Size 2N Array JavaScript Easy
938 Range Sum of BST JavaScript Medium
929 Unique Email Addresses JavaScript Easy
922 Sort Array By Parity II JavaScript Easy
905 Sort Array By Parity JavaScript Easy
890 Find and Replace Pattern JavaScript Medium
888 Uncommon Words from Two Sentences JavaScript Easy
881 Boats to Save People JavaScript Medium
876 Middle of the Linked List JavaScript Easy
859 Buddy Strings JavaScript Easy
852 Peak Index in a Mountain Array JavaScript Easy
844 Backspace String Compare JavaScript Easy
814 Binary Tree Pruning JavaScript Medium
804 Unique Morse Code Words JavaScript Easy
796 Rotate String JavaScript Easy
788 Rotated Digits JavaScript Easy
771 Jewels and Stones JavaScript Easy
760 Find Anagram Mappings JavaScript Easy
747 Largest Number At Least Twice of Others JavaScript Easy
744 Find Smallest Letter Greater Than Target JavaScript Easy
728 Self Dividing Numbers JavaScript Easy
724 Find Pivot Index JavaScript Easy
709 To Lower Case JavaScript Easy
701 Insert into a Binary Search Tree JavaScript Medium
693 Binary Number with Alternating Bits JavaScript Easy
692 Top K Frequent Words JavaScript Medium
686 Repeated String Match JavaScript Easy
682 Baseball Game JavaScript Easy
680 Valid Palindrome II JavaScript Easy
679 24 Game JavaScript Hard
678 Valid Parenthesis String JavaScript Medium
677 Map Sum Pairs JavaScript Medium
676 Implement Magic Dictionary JavaScript Medium
674 Longest Continuous Increasing Subsequence JavaScript Easy
672 Bulb Switcher II JavaScript Medium
671 Second Minimum Node In a Binary Tree JavaScript Easy
670 Maximum Swap JavaScript Medium
660 Remove 9 JavaScript Hard
657 Judge Route Circle JavaScript Easy
654 Maximum Binary Tree JavaScript Medium
653 Two Sum IV - Input is a BST JavaScript Easy
645 Set Mismatch JavaScript Easy
643 Maximum Average Subarray I JavaScript Easy
637 Average of Levels in Binary Tree JavaScript Easy
633 Sum of Square Numbers JavaScript Easy
628 Maximum Product of Three Numbers JavaScript Easy
623 Add One Row to Tree JavaScript Medium
617 Merge Two Binary Trees JavaScript Easy
606 Construct String from Binary Tree JavaScript Easy
599 Minimum Index Sum of Two Lists JavaScript Easy
563 Binary Tree Tilt JavaScript Easy
561 Array Partition I JavaScript Easy
557 Reverse Words in a String III JavaScript Easy
551 Student Attendance Record I JavaScript Easy
543 Diameter of Binary Tree JavaScript Easy
541 Reverse String II JavaScript Easy
532 K-diff Pairs in an Array JavaScript Easy
530 Minimum Absolute Difference in BST JavaScript Easy
524 Longest Word in Dictionary through Deleting JavaScript Medium
520 Detect Capital JavaScript Easy
518 Coin Change 2 JavaScript Medium
515 Find Largest Value in Each Tree Row JavaScript Medium
513 Find Bottom Left Tree Value JavaScript Medium
509 Fibonacci Number JavaScript Easy
508 Most Frequent Subtree Sum JavaScript Medium
507 Perfect Number JavaScript Easy
504 Base 7 JavaScript Easy
496 Next Greater Element I JavaScript Easy
482 License Key Formatting JavaScript Medium
476 Number Complement JavaScript Easy
461 Hamming Distance JavaScript Easy
449 Serialize and Deserialize BST JavaScript Medium
448 Find All Numbers Disappeared in an Array JavaScript Easy
442 Find All Duplicates in an Array JavaScript Medium
434 Number of Segments in a String JavaScript Easy
414 Third Maximum Number JavaScript Easy
412 Fizz Buzz JavaScript Easy
409 Longest Palindrome JavaScript Easy
405 Convert a Number to Hexadecimal JavaScript Easy
404 Sum of Left Leaves JavaScript Easy
387 First Unique Character in a String JavaScript Easy
384 Shuffle an Array JavaScript Medium
345 Reverse Vowels of a String JavaScript Easy
344 Reverse String JavaScript Easy
342 Power of Four JavaScript Easy
341 Flatten Nested List Iterator JavaScript Medium
326 Power of Three JavaScript Easy
322 Coin Change JavaScript Medium
319 Bulb Switcher JavaScript Medium
299 Bulls and Cows JavaScript Medium
297 Serialize and Deserialize Binary Tree JavaScript Hard
287 Find the Duplicate Number JavaScript Medium
283 Move Zeroes JavaScript Easy
278 First Bad Version JavaScript Easy
273 Integer to English Words JavaScript Hard
268 Missing Number JavaScript Easy
263 Ugly Number JavaScript Easy
234 Palindrome Linked List JavaScript Easy
230 Kth Smallest Element in BST JavaScript Medium
227 Basic Calculator II JavaScript Medium
226 Invert Binary Tree JavaScript Easy
225 Implement Stack using Queues JavaScript Medium
219 Contains Duplicate II JavaScript Easy
217 Contains Duplicate JavaScript Easy
215 Kth Largest Element in an Array JavaScript Medium
208 Implement Trie (Prefix Tree) JavaScript Medium
206 Reverse Linked List JavaScript Easy
205 Isomorphic Strings JavaScript Easy
203 Remove Linked List Elements JavaScript Easy
202 Happy Number JavaScript Easy
199 Binary Tree Right Side View JavaScript Medium
191 Number of 1 Bits JavaScript Easy
190 Reverse Bits JavaScript Easy
172 Factorial Trailing Zeroes JavaScript Easy
171 Excel Sheet Column Number JavaScript Easy
169 Majority Element JavaScript Easy
168 Excel Sheet Column Title JavaScript Easy
167 Two Sum II - Input array is sorted JavaScript Easy
165 Compare Version Numbers JavaScript Medium
155 Min Stack JavaScript Easy
151 Reverse Words in a String JavaScript Medium
146 LRU Cache JavaScript Hard
142 Linked List Cycle II JavaScript Medium
141 Linked List Cycle JavaScript Easy
136 Single Number JavaScript Medium
122 Best Time to Buy and Sell Stock II JavaScript Easy
121 Best Time to Buy and Sell Stock JavaScript Easy
119 Pascal's Triangle II JavaScript Easy
118 Pascal's Triangle JavaScript Easy
112 Path Sum JavaScript Easy
111 Minimum Depth of Binary Tree JavaScript Easy
109 Convert Sorted List to Binary Search Tree JavaScript Medium
108 Convert Sorted Array to Binary Search Tree JavaScript Easy
107 Binary Tree Level Order Traversal II JavaScript Easy
103 Binary Tree Zigzag Level Order Traversal JavaScript Medium
102 Binary Tree Level Order Traversal JavaScript Easy
101 Symmetric Tree JavaScript Easy
94 Binary Tree Inorder Traversal JavaScript Medium
92 Reverse Linked List II JavaScript Medium
88 Merge Sorted Array JavaScript Easy
86 Partition List JavaScript Medium
80 Remove Duplicates from Sorted Array II JavaScript Medium
70 Climbing Stairs JavaScript Easy
69 Sqrt(x) JavaScript Easy
67 Add Binary JavaScript Easy
66 Plus One JavaScript Easy
58 Length of Last Word JavaScript Easy
56 Merge Intervals JavaScript Medium
53 Maximum Subarray JavaScript Easy
50 Pow(x, n) JavaScript Medium
35 Search Insert Position JavaScript Easy
28 Implement strStr() JavaScript Easy
27 Remove Element JavaScript Easy
26 Remove Duplicates from Sorted Array JavaScript Easy
25 Reverse Nodes in k-Group JavaScript Hard
24 Swap Nodes in Pairs JavaScript Medium
23 Merge k Sorted Lists JavaScript Hard
22 Generate Parentheses JavaScript Medium
21 Merge Two Sorted Lists JavaScript Easy
20 Valid Parentheses JavaScript Easy
19 Remove Nth Node From End of List JavaScript Easy
17 Letter Combinations of a Phone Number JavaScript Medium
15 3Sum JavaScript Medium
14 Longest Common Prefix JavaScript Easy
13 Roman to Integer JavaScript Easy
12 Integer to Roman JavaScript Medium
11 Container With Most Water JavaScript Medium
10 Regular Expression Matching JavaScript Hard
9 Palindrome Number JavaScript Easy
8 String to Integer (atoi) JavaScript Easy
7 Reverse Integer JavaScript Easy
6 ZigZag Conversion JavaScript Easy
5 Longest Palindromic Substring JavaScript Medium
4 Median of Two Sorted Arrays JavaScript Hard
3 Longest Substring Without Repeating Characters JavaScript Medium
2 Add Two Numbers JavaScript Medium
1 Two Sum JavaScript Easy

LeetCode Shell

# Title Solution Difficulty
195 Tenth Line Shell Easy
193 Valid Phone Numbers Shell Easy

LeetCode SQL

# Title Solution Difficulty
627 Swap Salary SQL Easy
620 Not Boring Movies SQL Easy
596 Classes More Than 5 Students SQL Easy
595 Big Countries SQL Easy