Skip to content

n0madsoul/leetcode

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

LeetCode


Template



TwoPointer

# Title Acceptance Difficulty Solution Algorithm
0003 Longest Substring Without Repeating Characters 37.9% Medium Go
0019 Remove Nth Node From End of List 42.8% Medium Go
0027 Remove Element 59.8% Easy Go
0030 Substring with Concatenation of All Words 35.6% Hard Go
0042 Trapping Rain Water 57.5% Hard Go
0075 Sort Colors 59.4% Medium Go
0080 Remove Duplicates from Sorted Array II 61.6% Medium Go
0443 String Compression 47.7% Medium Go
0930 Binary Subarrays With Sum 54.5% Medium Go
1790 Check if One String Swap Can Make Strings Equal 65.1% Easy Go

Bit

# Title Acceptance Difficulty Solution Algorithm
0168 Excel Sheet Column Title 43.3% Easy Go
0231 Power of Two 50.3% Easy Go
0342 Power of Four 51.6% Easy Go
0401 Binary Watch 61.4% Easy Go
0461 Hamming Distance 81.2% Easy Go
0477 Total Hamming Distance 60.4% Medium Go
1689 Partitioning Into Minimum Number Of Deci-Binary Numbers 87.0% Medium Go
0000 [er-jin-zhi-zhong-1de-ge-shu-lcof ไบŒ่ฟ›ๅˆถไธญ1็š„ไธชๆ•ฐ](https://leetcode-cn.com/problems/er-jin-zhi-zhong-1de-ge-shu-lcof ไบŒ่ฟ›ๅˆถไธญ1็š„ไธชๆ•ฐ) NaN% Hard Go

Bfs

# Title Acceptance Difficulty Solution Algorithm
0098 Validate Binary Search Tree 34.9% Medium Go
0102 Binary Tree Level Order Traversal 64.2% Medium Go
0103 Binary Tree Zigzag Level Order Traversal 57.2% Medium Go
0107 Binary Tree Level Order Traversal II 69.5% Medium Go
0111 Minimum Depth of Binary Tree 48.4% Easy Go
0116 Populating Next Right Pointers in Each Node 70.3% Medium Go
0117 Populating Next Right Pointers in Each Node II 61.0% Medium Go
0199 Binary Tree Right Side View 65.3% Medium Go
0297 Serialize and Deserialize Binary Tree 55.8% Hard Go
0428 Serialize and Deserialize N-ary Tree 65.0% Hard Go
0429 N-ary Tree Level Order Traversal 69.8% Medium Go
0513 Find Bottom Left Tree Value 73.1% Medium Go
0515 Find Largest Value in Each Tree Row 64.3% Medium Go
0559 Maximum Depth of N-ary Tree 72.7% Easy Go
0623 Add One Row to Tree 54.6% Medium Go
0637 Average of Levels in Binary Tree 68.9% Easy Go
1161 Maximum Level Sum of a Binary Tree 63.3% Medium Go
1306 Jump Game III 57.7% Medium Go

Stack

# Title Acceptance Difficulty Solution Algorithm
0020 Valid Parentheses 44.5% Easy Go
0032 Longest Valid Parentheses 35.6% Hard Go
0071 Simplify Path 42.1% Medium Go
0084 Largest Rectangle in Histogram 43.3% Hard Go
0085 Maximal Rectangle 51.6% Hard Go
0094 Binary Tree Inorder Traversal 75.6% Easy Go
0103 Binary Tree Zigzag Level Order Traversal 57.2% Medium Go
0144 Binary Tree Preorder Traversal 70.3% Easy Go
0145 Binary Tree Postorder Traversal 74.9% Easy Go
0150 Evaluate Reverse Polish Notation 53.7% Medium Go
0155 Min Stack 57.2% Easy Go
0224 Basic Calculator 41.8% Hard Go
0225 Implement Stack using Queues 67.6% Easy Go
0227 Basic Calculator II 43.7% Medium Go
0232 Implement Queue using Stacks 69.1% Easy Go
0255 Verify Preorder Sequence in Binary Search Tree 47.2% Medium Go
0272 Closest Binary Search Tree Value II 64.5% Hard Go
0316 Remove Duplicate Letters 47.7% Medium Go
0331 Verify Preorder Serialization of a Binary Tree 48.0% Medium Go
0341 Flatten Nested List Iterator 72.7% Medium Go
0385 Mini Parser 41.5% Medium Go
0394 Decode String 55.1% Medium Go
0402 Remove K Digits 32.8% Medium Go
0430 Flatten a Multilevel Doubly Linked List 54.1% Medium Go
0439 Ternary Expression Parser 58.9% Medium Go
0445 Add Two Numbers II 58.8% Medium Go
0456 132 Pattern 36.3% Medium Go
0496 Next Greater Element I 68.8% Easy Go
0503 Next Greater Element II 63.4% Medium Go
0591 Tag Validator 34.0% Hard Go
0636 Exclusive Time of Functions 54.9% Medium Go
0726 Number of Atoms 55.5% Hard Go
0735 Asteroid Collision 41.1% Medium Go
0739 Daily Temperatures 67.8% Medium Go
0772 Basic Calculator III 49.0% Hard Go
0844 Backspace String Compare 51.5% Easy Go
0856 Score of Parentheses 62.5% Medium Go
0880 Decoded String at Index 25.2% Medium Go
0895 Maximum Frequency Stack 54.1% Hard Go
0901 Online Stock Span 54.2% Medium Go
0921 Minimum Add to Make Parentheses Valid 73.5% Medium Go
0946 Validate Stack Sequences 62.2% Medium Go
1003 Check If Word Is Valid After Substitutions 57.6% Medium Go
1019 Next Greater Node In Linked List 59.7% Medium Go
1081 Smallest Subsequence of Distinct Characters 57.1% Medium Go
1190 Reverse Substrings Between Each Pair of Parentheses 65.1% Medium Go
1544 Make The String Great 54.4% Easy Go
1598 Crawler Log Folder 67.1% Easy Go

Enum

# Title Acceptance Difficulty Solution Algorithm
0002 Add Two Numbers 40.8% Medium Go
0006 ZigZag Conversion 50.6% Medium Go
0014 Longest Common Prefix 40.7% Easy Go
0036 Valid Sudoku 62.9% Medium Go
0038 Count and Say 58.0% Medium Go
0041 First Missing Positive 41.9% Hard Go
0121 Best Time to Buy and Sell Stock 57.3% Easy Go
0122 Best Time to Buy and Sell Stock II 68.7% Medium Go
0171 Excel Sheet Column Number 71.7% Easy Go
1213 Intersection of Three Sorted Arrays 77.2% Easy Go
1295 Find Numbers with Even Number of Digits 80.9% Easy Go
1389 Create Target Array in the Given Order 83.1% Easy Go
1503 Last Moment Before All Ants Fall Out of a Plank 51.2% Medium Go
1646 Get Maximum in Generated Array 53.8% Easy Go
1672 Richest Customer Wealth 85.0% Easy Go

Tree

# Title Acceptance Difficulty Solution Algorithm
0022 Generate Parentheses 77.3% Medium Go dfs.catalan
Go dfs.recursive
0039 Combination Sum 72.7% Medium Go dfs.recursive
0040 Combination Sum II 62.8% Medium Go dfs.recursive
0094 Binary Tree Inorder Traversal 75.6% Easy Go dfs.inorder.recursive
Go dfs.inorder.stack
Go dfs.morris.break
Go dfs.morris.keep
0095 Unique Binary Search Trees II 69.9% Medium Go dfs.catalan
0096 Unique Binary Search Trees 69.9% Medium Go catalan
Go dp
0098 Validate Binary Search Tree 34.9% Medium Go dfs.inorder.recursive
Go dfs.inorder.stack
Go dfs.preorder.recursive
Go dfs.preorder.stack
0099 Recover Binary Search Tree 61.5% Medium Go dfs.inorder.recursive
Go dfs.inorder.stack
Go dfs.morris
0100 Same Tree 60.4% Easy Go dfs.recursive
0101 Symmetric Tree 56.1% Easy Go dfs.recursive
0102 Binary Tree Level Order Traversal 64.2% Medium Go dfs.recursive
0103 Binary Tree Zigzag Level Order Traversal 57.2% Medium Go dfs.recursive
0104 Maximum Depth of Binary Tree 76.6% Easy Go dfs
0105 Construct Binary Tree from Preorder and Inorder Traversal 70.4% Medium Go
0106 Construct Binary Tree from Inorder and Postorder Traversal 72.1% Medium Go
0107 Binary Tree Level Order Traversal II 69.5% Medium Go dfs.recursive
0108 Convert Sorted Array to Binary Search Tree 75.9% Easy Go dfs.recursive
0109 Convert Sorted List to Binary Search Tree 76.4% Medium Go array
Go inorder
Go recursive
0110 Balanced Binary Tree 56.2% Easy Go postorder
Go top
0111 Minimum Depth of Binary Tree 48.4% Easy Go dfs
0112 Path Sum 52.6% Easy Go dfs
0113 Path Sum II 62.6% Medium Go dfs
0114 Flatten Binary Tree to Linked List 72.6% Medium Go preorder.morris
0116 Populating Next Right Pointers in Each Node 70.3% Medium Go dfs
0124 Binary Tree Maximum Path Sum 44.3% Hard Go dfs
0129 Sum Root to Leaf Numbers 68.0% Medium Go dfs
0144 Binary Tree Preorder Traversal 70.3% Easy Go dfs.recursive
Go dfs.stack
Go morris.break
Go morris.keep
0145 Binary Tree Postorder Traversal 74.9% Easy Go dfs.recursive
0156 Binary Tree Upside Down 72.6% Medium Go link
0173 Binary Search Tree Iterator 80.3% Medium Go
0199 Binary Tree Right Side View 65.3% Medium Go dfs
0222 Count Complete Tree Nodes 78.0% Medium Go dfs
Go two pointer
0226 Invert Binary Tree 78.8% Easy Go dfs
0230 Kth Smallest Element in a BST 74.1% Medium Go dfs
0235 Lowest Common Ancestor of a Binary Search Tree 66.6% Easy Go dfs
0236 Lowest Common Ancestor of a Binary Tree 68.0% Medium Go dfs
0250 Count Univalue Subtrees 63.4% Medium Go dfs
0255 Verify Preorder Sequence in Binary Search Tree 47.2% Medium Go
0257 Binary Tree Paths 68.0% Easy Go dfs
0270 Closest Binary Search Tree Value 55.0% Easy Go
0272 Closest Binary Search Tree Value II 64.5% Hard Go
0285 Inorder Successor in BST 63.6% Medium Go
0297 Serialize and Deserialize Binary Tree 55.8% Hard Go bfs
Go dfs
0298 Binary Tree Longest Consecutive Sequence 57.9% Medium Go
0366 Find Leaves of Binary Tree 76.2% Medium Go
0404 Sum of Left Leaves 58.2% Easy Go dfs
0426 Convert Binary Search Tree to Sorted Doubly Linked List 66.8% Medium Go inorder
0428 Serialize and Deserialize N-ary Tree 65.0% Hard Go dfs
0437 Path Sum III 56.7% Medium Go dfs
Go hash table
0449 Serialize and Deserialize BST 55.5% Medium Go dfs.preorder
0450 Delete Node in a BST 48.5% Medium Go dfs
0501 Find Mode in Binary Search Tree 51.1% Easy Go dfs.recursive
0508 Most Frequent Subtree Sum 67.5% Medium Go dfs
0510 Inorder Successor in BST II 60.9% Medium Go
0530 Minimum Absolute Difference in BST 62.1% Easy Go dfs
0538 Convert BST to Greater Tree 69.6% Medium Go dfs
0543 Diameter of Binary Tree 54.9% Easy Go dfs
0559 Maximum Depth of N-ary Tree 72.7% Easy Go dfs
0563 Binary Tree Tilt 60.5% Easy Go dfs
0572 Subtree of Another Tree 47.4% Easy Go dfs
0589 N-ary Tree Preorder Traversal 74.5% Easy Go dfs.recursive
Go dfs.stack
0590 N-ary Tree Postorder Traversal 76.0% Easy Go dfs.recursive
Go dfs.stack
0606 Construct String from Binary Tree 56.8% Easy Go dfs
0617 Merge Two Binary Trees 78.8% Easy Go dfs.recursive
0653 Two Sum IV - Input is a BST 59.5% Easy Go dfs
0654 Maximum Binary Tree 81.0% Medium Go dfs
0669 Trim a Binary Search Tree 66.7% Medium Go dfs
0671 Second Minimum Node In a Binary Tree 48.7% Easy Go dfs
0687 Longest Univalue Path 44.0% Medium Go dfs
0700 Search in a Binary Search Tree 75.9% Easy Go dfs
0701 Insert into a Binary Search Tree 72.4% Medium Go dfs
0783 Minimum Distance Between BST Nodes 59.6% Easy Go dfs
0814 Binary Tree Pruning 70.0% Medium Go dfs
0865 Smallest Subtree with all the Deepest Nodes 65.4% Medium Go
0872 Leaf-Similar Trees 65.2% Easy Go dfs
0889 Construct Binary Tree from Preorder and Postorder Traversal 67.9% Medium Go
0897 Increasing Order Search Tree 74.6% Easy Go inorder
0938 Range Sum of BST 81.8% Easy Go
0951 Flip Equivalent Binary Trees 66.2% Medium Go dfs
0965 Univalued Binary Tree 68.4% Easy Go dfs
0979 Distribute Coins in Binary Tree 71.2% Medium Go dfs
1008 Construct Binary Search Tree from Preorder Traversal 72.6% Medium Go dfs
1022 Sum of Root To Leaf Binary Numbers 70.2% Easy Go dfs
1026 Maximum Difference Between Node and Ancestor 66.9% Medium Go dfs
1038 Binary Search Tree to Greater Sum Tree 79.3% Medium Go inorder
1104 Path In Zigzag Labelled Binary Tree 76.1% Medium Go
1123 Lowest Common Ancestor of Deepest Leaves 70.5% Medium Go dfs
1161 Maximum Level Sum of a Binary Tree 63.3% Medium Go bfs
1302 Deepest Leaves Sum 81.7% Medium Go dfs
1315 Sum of Nodes with Even-Valued Grandparent 81.0% Medium Go dfs
1325 Delete Leaves With a Given Value 72.9% Medium Go postorder
1448 Count Good Nodes in Binary Tree 71.3% Medium Go dfs
1484 Clone Binary Tree With Random Pointer 80.3% Medium Go dfs
1490 Clone N-ary Tree 85.5% Medium Go dfs
1560 Most Visited Sector in a Circular Track 57.4% Easy Go hash
1600 Throne Inheritance 68.2% Medium Go
1602 Find Nearest Right Node in Binary Tree 77.9% Medium Go bfs
1669 Merge In Between Linked Lists 76.7% Medium Go
1740 Find Distance in a Binary Tree 70.1% Medium Go dfs

Divide&conquer

# Title Acceptance Difficulty Solution Algorithm
0014 Longest Common Prefix 40.7% Easy Go

Back

# Title Acceptance Difficulty Solution Algorithm
0037 Sudoku Solver 67.1% Hard Go
0000 0038 NaN% Hard Go

Sort

# Title Acceptance Difficulty Solution Algorithm
0179 Largest Number 41.0% Medium Go

Search

# Title Acceptance Difficulty Solution Algorithm
0011 Container With Most Water 63.2% Medium Go
0015 3Sum 33.3% Medium Go
0016 3Sum Closest 46.0% Medium Go
0018 4Sum 40.1% Medium Go
0026 Remove Duplicates from Sorted Array 54.0% Easy Go
1838 Frequency of the Most Frequent Element 43.1% Medium Go
0000 [ ๅœจๆŽ’ๅบๆ•ฐ็ป„ไธญๆŸฅๆ‰พๆ•ฐๅญ— I ](https://leetcode-cn.com/problems/ ๅœจๆŽ’ๅบๆ•ฐ็ป„ไธญๆŸฅๆ‰พๆ•ฐๅญ— I) NaN% Hard Go

LinkedList

# Title Acceptance Difficulty Solution Algorithm
0021 Merge Two Sorted Lists 66.7% Easy Go
0023 Merge k Sorted Lists 55.9% Hard Go
0024 Swap Nodes in Pairs 70.3% Medium Go
0025 Reverse Nodes in k-Group 65.6% Hard Go
0061 Rotate List 41.8% Medium Go
0082 Remove Duplicates from Sorted List II 52.9% Medium Go
0083 Remove Duplicates from Sorted List 53.9% Easy Go
0086 Partition List 63.2% Medium Go
0092 Reverse Linked List II 54.7% Medium Go
0109 Convert Sorted List to Binary Search Tree 76.4% Medium Go array
Go inorder
Go recursive
0138 Copy List with Random Pointer 65.9% Medium Go
0141 Linked List Cycle 51.3% Easy Go
0142 Linked List Cycle II 55.2% Medium Go
0143 Reorder List 61.7% Medium Go
0147 Insertion Sort List 68.1% Medium Go
0160 Intersection of Two Linked Lists 61.2% Easy Go
0203 Remove Linked List Elements 51.3% Easy Go
0206 Reverse Linked List 72.2% Easy Go
0234 Palindrome Linked List 49.3% Easy Go
0237 Delete Node in a Linked List 84.8% Easy Go
0328 Odd Even Linked List 65.7% Medium Go
0369 Plus One Linked List 61.7% Medium Go
0379 Design Phone Directory 64.6% Medium Go
0430 Flatten a Multilevel Doubly Linked List 54.1% Medium Go
0445 Add Two Numbers II 58.8% Medium Go
0707 Design Linked List 31.8% Medium Go
0708 Insert into a Sorted Circular Linked List 33.5% Medium Go
0725 Split Linked List in Parts 56.3% Medium Go
0817 Linked List Components 59.2% Medium Go
0876 Middle of the Linked List 70.7% Easy Go
1019 Next Greater Node In Linked List 59.7% Medium Go
1171 Remove Zero Sum Consecutive Nodes from Linked List 47.2% Medium Go
1290 Convert Binary Number in a Linked List to Integer 80.9% Easy Go
1367 Linked List in Binary Tree 41.7% Medium Go
1474 Delete N Nodes After M Nodes of a Linked List 72.0% Easy Go
1634 Add Two Polynomials Represented as Linked Lists 52.2% Medium Go
Go
1669 Merge In Between Linked Lists 76.7% Medium Go
1670 Design Front Middle Back Queue 52.9% Medium Go
1721 Swapping Nodes in a Linked List 64.7% Medium Go
ๅ‰‘ๆŒ‡ Offer II 023 ไธคไธช้“พ่กจ็š„็ฌฌไธ€ไธช้‡ๅˆ่Š‚็‚น 71.5% Easy Go

BinarySearch

# Title Acceptance Difficulty Solution Algorithm
0004 Median of Two Sorted Arrays 40.7% Hard Go
0014 Longest Common Prefix 40.7% Easy Go
0033 Search in Rotated Sorted Array 42.6% Medium Go
0034 Find First and Last Position of Element in Sorted Array 42.4% Medium Go
0035 Search Insert Position 46.6% Easy Go
0278 First Bad Version 45.5% Easy Go
0374 Guess Number Higher or Lower 51.4% Easy Go
0701 Insert into a Binary Search Tree 72.4% Medium Go
0852 Peak Index in a Mountain Array 71.5% Easy Go

Catalan

# Title Acceptance Difficulty Solution Algorithm
0022 Generate Parentheses 77.3% Medium Go

StackMonotonic

# Title Acceptance Difficulty Solution Algorithm
0042 Trapping Rain Water 57.5% Hard Go

SortCounter

# Title Acceptance Difficulty Solution Algorithm
0274 H-Index 44.0% Medium Go
0451 Sort Characters By Frequency 71.1% Medium Go
1365 How Many Numbers Are Smaller Than the Current Number 82.5% Easy Go
1833 Maximum Ice Cream Bars 68.5% Medium Go

Hash

# Title Acceptance Difficulty Solution Algorithm
0001 Two Sum 51.9% Easy Go
0003 Longest Substring Without Repeating Characters 37.9% Medium Go
0041 First Missing Positive 41.9% Hard Go
0049 Group Anagrams 66.4% Medium Go
0170 Two Sum III - Data structure design 41.7% Easy Go
0205 Isomorphic Strings 50.1% Easy Go
0217 Contains Duplicate 56.1% Easy Go
0219 Contains Duplicate II 42.5% Easy Go
0242 Valid Anagram 64.4% Easy Go
0246 Strobogrammatic Number 47.4% Easy Go
0266 Palindrome Permutation 67.1% Easy Go
0290 Word Pattern 45.7% Easy Go
0349 Intersection of Two Arrays 73.8% Easy Go
0350 Intersection of Two Arrays II 55.0% Easy Go
0359 Logger Rate Limiter 72.5% Easy Go
0383 Ransom Note 59.5% Easy Go
0387 First Unique Character in a String 53.1% Easy Go
0389 Find the Difference 69.2% Easy Go
0409 Longest Palindrome 55.6% Easy Go
0448 Find All Numbers Disappeared in an Array 64.7% Easy Go
0500 Keyboard Row 70.9% Easy Go
0575 Distribute Candies 68.5% Easy Go
0594 Longest Harmonious Subsequence 51.6% Easy Go
0599 Minimum Index Sum of Two Lists 52.2% Easy Go
0604 Design Compressed String Iterator 37.3% Easy Go
0657 Robot Return to Origin 78.3% Easy Go
0690 Employee Importance 64.6% Easy Go
0697 Degree of an Array 60.6% Easy Go
0705 Design HashSet 64.7% Easy Go
0706 Design HashMap 64.4% Easy Go
0720 Longest Word in Dictionary 48.6% Easy Go
0734 Sentence Similarity 47.8% Easy Go
0748 Shortest Completing Word 59.9% Easy Go
0760 Find Anagram Mappings 83.9% Easy Go
0771 Jewels and Stones 85.1% Easy Go
0811 Subdomain Visit Count 70.3% Medium Go
0819 Most Common Word 42.1% Easy Go
0859 Buddy Strings 30.2% Easy Go
0884 Uncommon Words from Two Sentences 66.1% Easy Go
0888 Fair Candy Swap 64.0% Easy Go
0914 X of a Kind in a Deck of Cards 38.9% Easy Go
0929 Unique Email Addresses 64.3% Easy Go
0930 Binary Subarrays With Sum 54.5% Medium Go
0953 Verifying an Alien Dictionary 55.3% Easy Go
0961 N-Repeated Element in Size 2N Array 67.7% Easy Go
0997 Find the Town Judge 51.2% Easy Go
1002 Find Common Characters 73.8% Easy Go
1086 High Five 68.9% Easy Go
1119 Remove Vowels from a String 86.6% Easy Go
1122 Relative Sort Array 70.7% Easy Go
1128 Number of Equivalent Domino Pairs 54.5% Easy Go
1133 Largest Unique Number 64.5% Easy Go
1160 Find Words That Can Be Formed by Characters 68.8% Easy Go
1165 Single-Row Keyboard 83.8% Easy Go
1189 Maximum Number of Balloons 64.4% Easy Go
1275 Find Winner on a Tic Tac Toe Game 54.0% Easy Go
1331 Rank Transform of an Array 53.5% Easy Go
1346 Check If N and Its Double Exist 43.6% Easy Go
1370 Increasing Decreasing String 79.1% Easy Go
1394 Find Lucky Integer in an Array 66.4% Easy Go
1399 Count Largest Group 66.8% Easy Go
1426 Counting Elements 70.5% Easy Go
1436 Destination City 78.3% Easy Go
1460 Make Two Arrays Equal by Reversing Sub-arrays 74.4% Easy Go
1512 Number of Good Pairs 84.9% Easy Go
1536 Minimum Swaps to Arrange a Binary Grid 43.9% Medium Go
1570 Dot Product of Two Sparse Vectors 90.1% Medium Go
1603 Design Parking System 84.5% Easy Go
1624 Largest Substring Between Two Equal Characters 62.8% Easy Go
1640 Check Array Formation Through Concatenation 66.3% Easy Go
1656 Design an Ordered Stream 78.1% Easy Go
1711 Count Good Meals 35.9% Medium Go
1742 Maximum Number of Balls in a Box 70.7% Easy Go
1748 Sum of Unique Elements 75.0% Easy Go
1763 Longest Nice Substring 60.9% Easy Go
1796 Second Largest Digit in a String 48.7% Easy Go
1805 Number of Different Integers in a String 49.4% Easy Go
1935 Maximum Number of Words You Can Type 74.2% Easy Go
1941 Check if All Characters Have Equal Number of Occurrences 77.3% Easy Go
LCP 11 ๆœŸๆœ›ไธชๆ•ฐ็ปŸ่ฎก 68.4% Easy Go
0000 07 NaN% Hard Go
ๅ‰‘ๆŒ‡ Offer 50 ็ฌฌไธ€ไธชๅชๅ‡บ็Žฐไธ€ๆฌก็š„ๅญ—็ฌฆ LCOF 61.4% Easy Go
ๅ‰‘ๆŒ‡ Offer II 032 ๆœ‰ๆ•ˆ็š„ๅ˜ไฝ่ฏ 59.9% Easy Go
ๅ‰‘ๆŒ‡ Offer II 075 ๆ•ฐ็ป„็›ธๅฏนๆŽ’ๅบ 71.8% Easy Go
0000 01 NaN% Hard Go
Go
Go
Go
Go

Greedy

# Title Acceptance Difficulty Solution Algorithm
0045 Jump Game II 42.5% Medium Go
0055 Jump Game 43.2% Medium Go

Dp

# Title Acceptance Difficulty Solution Algorithm
0005 Longest Palindromic Substring 35.3% Medium Go
0010 Regular Expression Matching 31.6% Hard Go
0032 Longest Valid Parentheses 35.6% Hard Go
0042 Trapping Rain Water 57.5% Hard Go
0044 Wildcard Matching 32.8% Hard Go
0053 Maximum Subarray 55.1% Easy Go
0062 Unique Paths 66.0% Medium Go
0063 Unique Paths II 39.0% Medium Go
0064 Minimum Path Sum 68.8% Medium Go
0070 Climbing Stairs 52.8% Easy Go
0072 Edit Distance 61.3% Hard Go
0087 Scramble String 48.9% Hard Go
0091 Decode Ways 30.5% Medium Go
0097 Interleaving String 45.8% Medium Go
0115 Distinct Subsequences 52.4% Hard Go
0118 Pascal's Triangle 72.6% Easy Go
0119 Pascal's Triangle II 66.3% Easy Go
0120 Triangle 67.9% Medium Go
0121 Best Time to Buy and Sell Stock 57.3% Easy Go
0123 Best Time to Buy and Sell Stock III 53.4% Hard Go
0139 Word Break 51.3% Medium Go
0279 Perfect Squares 63.1% Medium Go
0303 Range Sum Query - Immutable 72.4% Easy Go
0322 Coin Change 44.3% Medium Go
0474 Ones and Zeroes 61.0% Medium Go
0509 Fibonacci Number 67.7% Easy Go
0518 Coin Change 2 65.2% Medium Go
0523 Continuous Subarray Sum 27.4% Medium Go
0525 Contiguous Array 53.7% Medium Go
0877 Stone Game 75.7% Medium Go
1480 Running Sum of 1d Array 86.9% Easy Go
1744 Can You Eat Your Favorite Candy on Your Favorite Day? 36.3% Medium Go
1769 Minimum Number of Operations to Move All Balls to Each Box 85.5% Medium Go

Classic

# Title Acceptance Difficulty Solution Algorithm
0005 Longest Palindromic Substring 35.3% Medium Go manacher
0028 Implement strStr() 40.7% Easy Go kmp
0169 Majority Element 66.5% Easy Go Boyer-Moore ๆŠ•็ฅจ
0000 10 NaN% Hard Go Boyer-Moore ๆŠ•็ฅจ

Math

# Title Acceptance Difficulty Solution Algorithm
0007 Reverse Integer 35.4% Easy Go
0008 String to Integer (atoi) 21.7% Medium Go
0009 Palindrome Number 58.5% Easy Go
0012 Integer to Roman 66.5% Medium Go
0013 Roman to Integer 63.3% Easy Go
0029 Divide Two Integers 20.7% Medium Go
0031 Next Permutation 37.3% Medium Go
0043 Multiply Strings 44.9% Medium Go
0066 Plus One 45.8% Easy Go
0191 Number of 1 Bits 74.7% Easy Go
0268 Missing Number 62.3% Easy Go
0292 Nim Game 69.7% Easy Go
0319 Bulb Switcher 51.6% Medium Go
0415 Add Strings 53.6% Easy Go
0877 Stone Game 75.7% Medium Go
1025 Divisor Game 71.0% Easy Go
1266 Minimum Time Visiting All Points 82.4% Easy Go
1281 Subtract the Product and Sum of Digits of an Integer 83.2% Easy Go
1313 Decompress Run-Length Encoded List 83.1% Easy Go
1403 Minimum Subsequence in Non-Increasing Order 69.1% Easy Go
1791 Find Center of Star Graph 81.0% Easy Go

Sql

# Title Acceptance Difficulty Solution Algorithm
0175 Combine Two Tables 74.0% Easy Go
0176 Second Highest Salary 35.6% Easy Go
0177 Nth Highest Salary 46.2% Medium Go
0178 Rank Scores 60.2% Medium Go
0180 Consecutive Numbers 48.7% Medium Go
0181 Employees Earning More Than Their Managers 70.3% Easy Go
0182 Duplicate Emails 79.7% Easy Go
0183 Customers Who Never Order 67.8% Easy Go
0184 Department Highest Salary 47.5% Medium Go
0185 Department Top Three Salaries 49.3% Hard Go
0196 Delete Duplicate Emails 66.5% Easy Go
0197 Rising Temperature 53.4% Easy Go
0262 Trips and Users 43.8% Hard Go
0511 Game Play Analysis I 73.4% Easy Go
0512 Game Play Analysis II 53.8% Easy Go
0534 Game Play Analysis III 67.6% Medium Go
0550 Game Play Analysis IV 43.8% Medium Go
0569 Median Employee Salary 56.2% Hard Go
0570 Managers with at Least 5 Direct Reports 66.4% Medium Go
0571 Find Median Given Frequency of Numbers 48.9% Hard Go
0574 Winning Candidate 64.8% Medium Go
0577 Employee Bonus 70.6% Easy Go
0578 Get Highest Answer Rate Question 49.8% Medium Go
0579 Find Cumulative Salary of an Employee 41.3% Hard Go
0580 Count Student Number in Departments 52.5% Medium Go
0584 Find Customer Referee 77.3% Easy Go
0585 Investments in 2016 59.5% Medium Go
0586 Customer Placing the Largest Number of Orders 75.0% Easy Go
0595 Big Countries 79.6% Easy Go
0596 Classes More Than 5 Students 42.0% Easy Go
0597 Friend Requests I: Overall Acceptance Rate 44.1% Easy Go
0601 Human Traffic of Stadium 49.7% Hard Go
0602 Friend Requests II: Who Has the Most Friends 62.9% Medium Go
0603 Consecutive Available Seats 67.4% Easy Go
0607 Sales Person 66.5% Easy Go
0608 Tree Node 65.9% Medium Go
0610 Triangle Judgement 66.7% Easy Go
0612 Shortest Distance in a Plane 66.9% Medium Go
0613 Shortest Distance in a Line 81.7% Easy Go
0614 Second Degree Follower 34.6% Medium Go
0615 Average Salary: Departments VS Company 42.4% Hard Go
0618 Students Report By Geography 62.1% Hard Go
0619 Biggest Single Number 46.6% Easy Go
0620 Not Boring Movies 77.3% Easy Go
0626 Exchange Seats 68.3% Medium Go
0627 Swap Salary 80.7% Easy Go
1045 Customers Who Bought All Products 64.5% Medium Go
1050 Actors and Directors Who Cooperated At Least Three Times 75.7% Easy Go
1068 Product Sales Analysis I 86.4% Easy Go
1069 Product Sales Analysis II 82.0% Easy Go
1070 Product Sales Analysis III 48.4% Medium Go
1075 Project Employees I 69.5% Easy Go
1076 Project Employees II 49.7% Easy Go
1077 Project Employees III 72.2% Medium Go
1082 Sales Analysis I 76.0% Easy Go
1083 Sales Analysis II 52.8% Easy Go
1084 Sales Analysis III 53.8% Easy Go
1097 Game Play Analysis V 51.9% Hard Go
1098 Unpopular Books 47.4% Medium Go
1107 New Users Daily Count 41.0% Medium Go
1112 Highest Grade For Each Student 64.3% Medium Go
1113 Reported Posts 54.2% Easy Go
1126 Active Businesses 69.4% Medium Go
1127 User Purchase Platform 41.7% Hard Go
1132 Reported Posts II 38.9% Medium Go
1141 User Activity for the Past 30 Days I 51.1% Easy Go
1142 User Activity for the Past 30 Days II 37.1% Easy Go
1148 Article Views I 71.8% Easy Go
1149 Article Views II 44.3% Medium Go
1158 Market Analysis I 55.1% Medium Go
1159 Market Analysis II 48.9% Hard Go
1164 Product Price at a Given Date 61.6% Medium Go
1173 Immediate Food Delivery I 75.7% Easy Go
1174 Immediate Food Delivery II 62.0% Medium Go
1179 Reformat Department Table 63.4% Easy Go
1193 Monthly Transactions I 61.0% Medium Go
1194 Tournament Winners 51.5% Hard Go
1204 Last Person to Fit in the Bus 72.9% Medium Go
1205 Monthly Transactions II 46.8% Medium Go
1211 Queries Quality and Percentage 65.8% Easy Go
1212 Team Scores in Football Tournament 51.5% Medium Go
1225 Report Contiguous Dates 54.5% Hard Go
1241 Number of Comments per Post 59.7% Easy Go
1251 Average Selling Price 77.2% Easy Go
1264 Page Recommendations 57.3% Medium Go
1270 All People Report to the Given Manager 80.5% Medium Go
1280 Students and Examinations 50.6% Easy Go
1285 Find the Start and End Number of Continuous Ranges 81.3% Medium Go
1294 Weather Type in Each Country 66.0% Easy Go
1303 Find the Team Size 82.1% Easy Go
1308 Running Total for Different Genders 75.1% Medium Go
1321 Restaurant Growth 61.7% Medium Go
1322 Ads Performance 59.2% Easy Go
1327 List the Products Ordered in a Period 69.2% Easy Go
1336 Number of Transactions per Visit 42.3% Hard Go
1341 Movie Rating 48.0% Medium Go
1350 Students With Invalid Departments 84.8% Easy Go
1355 Activity Participants 66.2% Medium Go
1364 Number of Trusted Contacts of a Customer 67.5% Medium Go
1369 Get the Second Most Recent Activity 60.7% Hard Go
1378 Replace Employee ID With The Unique Identifier 86.1% Easy Go
1384 Total Sales Amount by Year 54.2% Hard Go
1393 Capital Gain/Loss 85.7% Medium Go
1398 Customers Who Bought Products A and B but Not C 77.1% Medium Go
1407 Top Travellers 66.7% Easy Go
1412 Find the Quiet Students in All Exams 55.1% Hard Go
1418 Display Table of Food Orders in a Restaurant 73.3% Medium Go
1421 NPV Queries 74.8% Medium Go
1435 Create a Session Bar Chart 62.1% Easy Go
1440 Evaluate Boolean Expression 69.6% Medium Go
1445 Apples & Oranges 85.8% Medium Go
1454 Active Users 40.3% Medium Go
1459 Rectangles Area 59.4% Medium Go
1468 Calculate Salaries 71.2% Medium Go
1479 Sales by Day of the Week 57.4% Hard Go
1485 Group Sold Products By The Date 66.0% Easy Go
1495 Friendly Movies Streamed Last Month 54.3% Easy Go
1501 Countries You Can Safely Invest In 59.1% Medium Go
1511 Customer Order Frequency 68.1% Easy Go
1517 Find Users With Valid E-Mails 72.9% Easy Go
1527 Patients With a Condition 50.8% Easy Go
1532 The Most Recent Three Orders 62.0% Medium Go
1543 Fix Product Name Format 54.8% Easy Go
1549 The Most Recent Orders for Each Product 66.7% Medium Go
1555 Bank Account Summary 43.5% Medium Go
1565 Unique Orders and Customers Per Month 72.6% Easy Go
1571 Warehouse Manager 75.7% Easy Go
1581 Customer Who Visited but Did Not Make Any Transactions 81.1% Easy Go
1587 Bank Account Summary II 82.5% Easy Go
1596 The Most Frequently Ordered Products for Each Customer 76.2% Medium Go
1607 Sellers With No Sales 54.8% Easy Go
1613 Find the Missing IDs 72.4% Medium Go
1623 All Valid Triplets That Can Represent a Country 78.3% Easy Go
1633 Percentage of Users Attended a Contest 65.7% Easy Go
1635 Hopper Company Queries I 54.4% Hard Go
1645 Hopper Company Queries II 41.2% Hard Go
1651 Hopper Company Queries III 68.6% Hard Go
1661 Average Time of Process per Machine 73.1% Easy Go
1667 Fix Names in a Table 60.3% Easy Go
1677 Product's Worth Over Invoices 40.0% Easy Go
1683 Invalid Tweets 89.5% Easy Go
1693 Daily Leads and Partners 80.2% Easy Go
1699 Number of Calls Between Two Persons 79.9% Medium Go
1709 Biggest Window Between Visits 71.5% Medium Go
1715 Count Apples and Oranges 73.8% Medium Go
1729 Find Followers Count 62.5% Easy Go
1731 The Number of Employees Which Report to Each Employee 47.8% Easy Go
1741 Find Total Time Spent by Each Employee 84.5% Easy Go
1747 Leetflex Banned Accounts 70.4% Medium Go
1757 Recyclable and Low Fat Products 92.4% Easy Go
1767 Find the Subtasks That Did Not Execute 79.6% Hard Go
1777 Product's Price for Each Store 77.9% Easy Go
1783 Grand Slam Titles 78.9% Medium Go
1789 Primary Department for Each Employee 71.4% Easy Go
1795 Rearrange Products Table 79.1% Easy Go
1809 Ad-Free Sessions 64.0% Easy Go
1811 Find Interview Candidates 66.5% Medium Go
1821 Find Customers With Positive Revenue this Year 90.0% Easy Go
1831 Maximum Transaction Each Day 73.3% Medium Go

About

๐ŸŒ“in the dead of night

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.8%
  • JavaScript 0.2%