Skip to content

FakeStandard/LeetCode-CSharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

LeetCode

1-100

No. Title Tag Solution Difficulty UnitTest Post
0001 Two Sum Array, Dictionary TwoSum Easy πŸ’‘ πŸ“„
0002 Add Two Numbers Linked List, Recursion AddTwoNumbers Medium πŸ’‘
0003 Longest Substring Without Repeating Characters String LengthOfLongestSubstring Medium πŸ’‘
0004 Array Hard
0005 Longest Palindromic Substring String LongestPalindrome Medium πŸ’‘
0006
0007 Reverse Integer Array.Reverse, string.Contains, string.Replace Reverse Easy πŸ’‘
0008
0009 Palindrome Number %,/ IsPalindrome Easy πŸ’‘ πŸ“„
0010
0011 Container With Most Water Array, Two Pointers, Greedy Medium πŸ’‘
0012
0013 Roman to Integer Dictionary RomanToInt Easy πŸ’‘ πŸ“„
0014 Longest Common Prefix Array LongestCommonPrefix Easy πŸ’‘ πŸ“„
0015 3Sum Array ThreeSum Medium πŸ’‘
0016 3Sum Closest Array ThreeSumClosest Medium πŸ’‘
0017
0018 4Sum Array, HashSet, Binary Search FourSum Medium πŸ’‘
0019 Remove Nth Node From End of List Linked List RemoveNthFromEnd Medium πŸ’‘
0020 Valid Parentheses Stack IsValid Easy πŸ’‘ πŸ“„
0021 Merge Two Sorted Lists Linked List MergeTwoLists Easy πŸ’‘ πŸ“„
0022
0023
0024 Swap Nodes in Pairs Linked List SwapPairs Medium πŸ’‘
0025 Reverse Nodes in k-Group Linked List ReverseKGroup Hard πŸ’‘
0026 Remove Duplicates from Sorted Array Array RemoveDuplicates Easy πŸ’‘ πŸ“„
0027 Remove Element Array RemoveElement Easy πŸ’‘ πŸ“„
0028 Implement strStr() string.Contains StrStr Easy πŸ’‘
0029
0030
0031 Array Medium
0032 Longest Valid Parentheses Stack LongestValidParentheses Hard πŸ’‘
0033 Array Medium
0034 Array Medium
0035 Search Insert Position Binary Search, Array SearchInsert Easy πŸ’‘ πŸ“„
0036 Valid Sudoku Hash Set, Array ValidSudoku Medium πŸ’‘
0037 Sudoku Solver Array, Backtracking SolveSuduku Hard πŸ’‘
0038
0039 Array Medium
0040 Array, Backtracking Medium
0041 Array Hard
0042 Array Hard
0043 Multiply Strings String Multiply Medium πŸ’‘
0044
0045 Jump Game II Array, DP, Greedy Medium πŸ’‘
0046 Permutations Array, Backtracking Permute Medium πŸ’‘
0047 Array Medium
0048 Rotate Image Array, Matrix Rotate Medium
0049 Group Anagrams String GroupAnagrams Medium πŸ’‘
0050
0051 Array Hard
0052
0053 Maximum Subarray Array MaxSubArray Easy πŸ’‘
0054 Array Medium
0055 Array Medium
0056 Merge Intervals Array Merge Medium πŸ’‘
0057 Array Medium
0058 Length of Last Word String LengthOfLastWord Easy πŸ’‘ πŸ“„
0059 Spiral Matrix II Array, Matrix GenerateMatrix Medium πŸ’‘
0060
0061
0062
0063 Array Medium
0064 Array Medium
0065
0066 Plus One Array PlusOne Easy πŸ’‘ πŸ“„
0067 Add Binary Bit Manipulation AddBinary Easy πŸ’‘ πŸ“„
0068 Array Hard
0069 Sqrt(x) Enumeration MySqrt Easy πŸ’‘
0070 Climbing Stairs Fibonacci, DP ClimbStairs Easy πŸ’‘
0071
0072
0073 Array Medium
0074 Search a 2D Matrix Array SearchMatrix Medium πŸ’‘
0075 Sort Colors Array, Sorting SortColors Medium
0076
0077 Combinations Backtracking Combine Medium πŸ’‘
0078 Array Medium
0079 Array Medium
0080 Array Medium
0081 Array Medium
0082 Remove Duplicates from Sorted List II Linked List DeleteDuplicates Medium πŸ’‘
0083 Remove Duplicates from Sorted List Linked List DeleteDuplicates Easy πŸ’‘ πŸ“„
0084 Array Hard
0085 Array Hard
0086
0087
0088 Merge Sorted Array Array Merge Easy
0089
0090 Array Medium
0091
0092
0093
0094 Binary Tree Inorder Traversal Tree, DFS, Binary Tree InorderTraversal Easy ❌ πŸ“„
0095
0096
0097
0098
0099
0100 Same Tree Tree, DFS, BFS, Binary Tree IsSameTree Easy ❌ πŸ“„

101-200

No. Title Tag Solution Difficulty UnitTest
0101 Symmetric Tree Tree, DFS, BFS, Binary Tree IsSymmetric Easy ❌
0102 Binary Tree Level Order Traversal Tree, BFS, Binary Tree LevelOrder Medium
0103
0104 Maximum Depth of Binary Tree Tree, DFS, BFS, Binary Tree MaxDepth Easy
0105 Construct Binary Tree from Preorder and Inorder Traversal Array, Tree, Binary Tree BuildTree Medium
0106
0107
0108 Convert Sorted Array to Binary Search Tree Array, Tree SortedArrayToBST Easy
0109
0110
0111 Minimum Depth of Binary Tree Tree, DFS, BFS, Binary Tree MinDepth Easy
0112
0113 Path Sum II Tree, DFS, Binary Tree PathSum Medium
0114 Flatten Binary Tree to Linked List Tree, DFS, Binary Tree Flatten Medium
0115
0116 Populating Next Right Pointers in Each Node Linked List, Tree, DFS, BFS, Binary Tree Connect Medium
0117
0118 Pascal's Triangle Array, DP Generate Easy πŸ’‘
0119 Pascal's Triangle II Array, DP GetRow Easy πŸ’‘
0120 Triangle Array, DP MinimumTotal Medium πŸ’‘
0121 Best Time to Buy and Sell Stock DP MaxProfit Easy πŸ’‘
0122
0123
0124
0125 Valid Palindrome Binary Search IsPalindrome Easy πŸ’‘
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136 Single Number Array, Bit Manipulation, XOR SingleNumber Easy πŸ’‘
0137
0138
0139
0140
0141 Linked List Cycle Linked List, Two Pointers HasCycle Easy ❌
0142 Linked List Cycle II Linked List, HastSet DetectCycle Medium
0143 Reorder List Linked List ReorderList Medium
0144 Binary Tree Preorder Traversal Tree, DFS, Binary Tree PreorderTraversal Easy
0145 Binary Tree Postorder Traversal Tree, DFS, Binary Tree PostorderTraversal Easy
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155 Min Stack Stack MinStack Easy
0156
0157
0158
0159
0160 Intersection of Two Linked Lists Linked List, Two Pointers GetIntersectionNode Easy
0161
0162 Find Peak Element Array FindPeakElement Medium πŸ’‘
0163
0164
0165
0166
0167 Two Sum II - Input array is sorted Array, Binary Search TwoSum Medium πŸ’‘
0168 Excel Sheet Column Title Array, char ConvertToTitle Easy πŸ’‘
0169 Majority Element Array, Dictionary MajorityElement Easy πŸ’‘
0170
0171
0172 Factorial Trailing Zeroes Enumeration TrailingZeroes Easy πŸ’‘
0173 Binary Search Tree Iterator Stack, Tree BSTIterator Medium
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185
0186
0187 Repeated DNA Sequences String, Hash Table FindRepeatedDnaSequences Medium πŸ’‘
0188
0189 Rotate Array Array Rotate Medium
0190 Reverse Bits Bit Manipulation reverseBits Easy
0191 Number of 1 Bits Bit Manipulation HammingWeight Easy
0192
0193
0194
0195
0196
0197
0198 House Robber Array, DP Rob Medium πŸ’‘
0199 Binary Tree Right Side View Tree, DFS, BFS, Binary Tree RightSideView Medium
0200

201-300

No. Title Tag Solution Difficulty UnitTest
0202 Happy Number HashSet IsHappy Easy πŸ’‘
0203 Remove Linked List Elements Linked List RemoveElements Easy πŸ’‘
0204 Count Primes Array CountPrimes Easy πŸ’‘
0205 Isomorphic Strings Dictionary IsIsomorphic Easy πŸ’‘
0206 Reverse Linked List Linked List, Recursion ReverseList Easy πŸ’‘
0215 Kth Largest Element in an Array Array FindKthLargest Medium πŸ’‘
0217 Contains Duplicate HashSet ContainsDuplicate Easy πŸ’‘
0219 Contains Duplicate II Dictionary ContainsNearbyDuplicate Easy πŸ’‘
0225 Implement Stack using Queues Stack MyStack Easy
0226 Contains Duplicate II Tree, DFS, BFS, Binary Tree InvertTree Easy
0215 Kth Largest Element in an Array Array FindKthLargest Medium πŸ’‘
0230 Kth Smallest Element in a BST Tree, DFS, BFS, Binary Tree KthSmallest Medium
0231 Power of Two Bit Manipulation, Shift IsPowerOfTwo Easy πŸ’‘
0232 Contains Duplicate II Queue, Stack MyQueue Easy
0234 Palindrome Linked List Stack, Linked List IsPalindrome Easy πŸ’‘
0236 Lowest Common Ancestor of a Binary Tree Tree, DFS, Binary Tree LowestCommonAncestor Medium
0235 Lowest Common Ancestor of a Binary Search Tree Tree, DFS, BFS, Binary Tree LowestCommonAncestor Easy
0237 Delete Node in a Linked List Linked List DeleteNode Easy
0238 Product of Array Except Self Array ProductExceptSelf Medium πŸ’‘
0240 Search a 2D Matrix II Array SearchMatrix Medium πŸ’‘
0242 Valid Anagram Array IsAnagram Easy πŸ’‘
0257 Binary Tree Paths Tree, DFS, Binary Tree BinaryTreePaths Easy
0258 Add Digits Remainder(%) Operator AddDigits Easy πŸ’‘
0268 Missing Number Array, Binary Search, Bit Manipulation, Bit Manipulation MissingNumber Easy πŸ’‘
0278 First Bad Version Binary Search FirstBadVersion Easy ❌
0283 Move Zeroes Enumeration MoveZeroes Easy
0290 Word Pattern String WordPattern Easy πŸ’‘
0297 Serialize and Deserialize Binary Tree String, Tree Codec Hard

301-400

No. Title Tag Solution Difficulty UnitTest
0326 Power of Three Remainder(%) Operator IsPowerOfThree Easy πŸ’‘
0334 Increasing Triplet Subsequence Array IncreasingTriplet Medium πŸ’‘
0338 Bit Manipulation, DP Easy
0342 Bit Manipulation, Recursion Easy
0344 Reverse String String ReverseString Easy
0347 Top K Frequent Elements Array TopKFrequent Medium πŸ’‘
0350
0378 Kth Smallest Element in a Sorted Matrix Binary Search, Matrix KthSmallest Medium πŸ’‘
0383
0387 First Unique Character in a String Dictionary FirstUniqChar Easy πŸ’‘
0389 Find the Difference Bit Manipulation, XOR FindTheDifference Easy πŸ’‘
0392 Is Subsequence Two Pointers, DP IsSubsequence Easy πŸ’‘

401-500

No. Title Tag Solution Difficulty UnitTest
0401 Bit Manipulation Easy
0404 Sum of Left Leaves Tree, DFS, BFS, Binary Tree SumOfLeftLeaves Easy
0405 Bit Manipulation Easy
0409 Longest Palindrome String, Stack, Dictionary LongestPalindrome Easy πŸ’‘
0415 Add Strings AddStrings Easy πŸ’‘
0450 Delete Node in a BST Tree, BST, Binary Tree DeleteNode Medium
0451 Sort Characters By Frequency String, Dictionary FrequencySort Medium πŸ’‘
0461 Bit Manipulation Easy
0476 Number Complement Bit Manipulation FindComplement Easy πŸ’‘
0485 Max Consecutive Ones FindMaxConsecutiveOnes Easy πŸ’‘
0500

501-600

No. Title Tag Solution Difficulty UnitTest
0509 Fibonacci Number Fibonacci, Recursion, DP Fib Easy πŸ’‘
0542 01 Matrix Array, DP, BFS, Matrix UpdateMatrix Medium πŸ’‘
0557 Reverse Words in a String III Array, String ReverseWords Easy πŸ’‘
0560 Subarray Sum Equals K Array, Dictionary SubarraySum Medium πŸ’‘
0566 Reshape the Matrix Array, Matrix MatrixReshape Medium πŸ’‘
0567 Permutation in String String CheckInclusion Medium πŸ’‘
0589 N-ary Tree Preorder Traversal Tree Preorder Easy

601-700

No. Title Tag Solution Difficulty UnitTest
0611 Valid Triangle Number Binary Search TriangleNumber Medium πŸ’‘
0617 Merge Two Binary Trees Tree, DFS, BFS, Binary Tree MergeTrees Easy
0645 Array, Bit Manipulation Easy
0653 Two Sum IV - Input is a BST Tree, DFS, BFS, Binary Tree FindTarget Easy
0682 Baseball Game Stack CalPoints Easy πŸ’‘
0695 Max Area of Island Array, DFS, BFS, Matrix MaxAreaOfIsland Medium πŸ’‘
0693 Bit Manipulation Easy
0700 Search in a Binary Search Tree Tree, Binary Tree SearchBST Easy

701-800

No. Title Tag Solution Difficulty UnitTest
0701 Insert into a Binary Search Tree Tree, BST, Binary Tree InsertIntoBST Medium
0704 Binary Search Array, Binary Tree Search Easy πŸ’‘
0705 Array, Linked List Easy
0706 Design HashMap Array, Hash Table, Linked List MyHashMap Easy
0707 Design Linked List Linked List MyLinkedList Medium
0709 To Lower Case Char ToLowerCase Easy πŸ’‘
0717 1-bit and 2-bit Characters Array IsOneBitCharacter Easy πŸ’‘
0718 Maximum Length of Repeated Subarray Array, Matrix FindLength Medium πŸ’‘
0728 Self Dividing Numbers Remainder(%) operator SelfDividingNumbers Easy πŸ’‘
0733 Flood Fill Array, DFS, BFS, Matrix FloodFill Easy πŸ’‘
0746 Array, DP Easy
0762 Bit Manipulation Easy
0771 Jewels and Stones string.Contains NumJewelsInStones Easy πŸ’‘
0784 Letter Case Permutation String, Backtracking, BitManipulation LetterCasePermutation Medium πŸ’‘
0791 Custom Sort String Dictionary, Hash Table ❓ CustomSortString Medium πŸ’‘

801-900

No. Title Tag Solution Difficulty UnitTest
0824 Goat Latin DP ToGoatLatin Easy πŸ’‘
0841 Keys and Rooms DFS, BFS, Graph CanVisitAllRooms Medium πŸ’‘
0852 Peak Index in a Mountain Array Array PeakIndexInMountainArray Easy πŸ’‘
0868 Bit Manipulation Easy
0876 Middle of the Linked List Linked List MiddleNode Easy πŸ’‘
0897 Increasing Order Search Tree Tree, DFS, BFS, Binary Tree IncreasingBST Easy

901-1000

No. Title Tag Solution Difficulty UnitTest
0905 Sort Array By Parity Array SortArrayByParity Easy πŸ’‘
0912 Sort an Array Quick Sort SortArray Medium πŸ’‘
0917 Reverse Only Letters String ReverseOnlyLetters Easy πŸ’‘
0938 Range Sum of BST Tree, DFS, BFS, Binary Tree RangeSumBST Easy πŸ’‘
0961 N-Repeated Element in Size 2N Array Array RepeatedNTimes Easy πŸ’‘
0977 Squares of a Sorted Array Quick Sort SortedSquares Easy πŸ’‘
0994 Rotting Oranges Array, BFS, Matrix OrangesRotting Medium πŸ’‘
0997 Find the Town Judge Array FindJudge Easy πŸ’‘

1001-1100

No. Title Tag Solution Difficulty UnitTest
1022 Sum of Root To Leaf Binary Numbers Tree SumRootToLeaf Easy
1025 DP Easy
1047 Remove All Adjacent Duplicates In String String RemoveDuplicates Easy πŸ’‘

1101-1200

No. Title Tag Solution Difficulty UnitTest
1009 Bit Manipulation Easy
1108 Defanging an IP Address String DefangIPaddr Easy πŸ’‘
1137 DP Easy

1201-1300

No. Title Tag Solution Difficulty UnitTest
1207 Unique Number of Occurrences Array UniqueOccurrences Easy πŸ’‘
1220 Count Vowels Permutation DP CountVowelPermutation Hard πŸ’‘
1221 Split a String in Balanced Strings String BalancedStringSplit Easy πŸ’‘
1249 Minimum Remove to Make Valid Parentheses String MinRemoveToMakeValid Medium πŸ’‘
1281 Subtract the Product and Sum of Digits of an Integer Enumeration, Remainder(%) operator SubtractProductAndSum Easy πŸ’‘
1290 Convert Binary Number in a Linked List to Integer Linked List GetDecimalValue Easy πŸ’‘
1295 Find Numbers with Even Number of Digits Array FindNumbers Easy πŸ’‘
1299 Replace Elements with Greatest Element on Right Side Array ReplaceElements Easy πŸ’‘

1301-

No. Title Tag Solution Difficulty UnitTest
1313 Decompress Run-Length Encoded List List, Array DecompressRLElist Easy πŸ’‘
1342 Nnumber of Steps to Reduce a Number to Zero Bit Manipulation NumberOfSteps Easy πŸ’‘
1351 Count Negative Numbers in a Sorted Matrix Array CountNegatives Easy πŸ’‘
1356 Array, Bit Manipulation Easy
1365 How Many Numbers Are Smaller Than the Current Number Array SmallerNumbersThanCurrent Easy πŸ’‘
1370 Increasing Decreasing String String, Char SortString Easy πŸ’‘
1380 Lucky Numbers in a Matrix Array, List LuckyNumbers Easy πŸ’‘
1389 Create Target Array in the Given Order Array, List CreateTargetArray Easy πŸ’‘
1431 Kids With the Greatest Number of Candies Array, List KidsWithCandies Easy πŸ’‘
1436 Destination City Enumeration DestCity Easy πŸ’‘
1460 Make Two Arrays Equal by Reversing Sub-arrays Array CanBeEqual Easy πŸ’‘
1470 Shuffle the Array Array Shuffle Easy πŸ’‘
1480 Running Sum of 1d Array Array RunningSum Easy πŸ’‘
1486 XOR Operation in an Array Bit Manipulation, XOR XorOperation Easy πŸ’‘
1491 Number of Good Pairs Array Average Easy πŸ’‘
1512 Number of Good Pairs Array NumIdenticalPairs Easy πŸ’‘
1523 Count Odd Numbers in an Interval Range /,% CountOdds Easy πŸ’‘
1528 Shuffle String Array RestoreString Easy πŸ’‘
1534 Count Good Triplets Array CountGoodTriplets Easy πŸ’‘
1557 Minimum Number of Vertices to Reach All Nodes Graph FindSmallestSetOfVertices Medium πŸ’‘
1588 Sum of All Odd Length Subarrays Array SumOddLengthSubarrays Easy πŸ’‘
1603 Design Parking System Array ParkingSystem Easy πŸ’‘
1614 Maximum Nesting Depth of the Parentheses String MaxDepth Easy πŸ’‘
1636 Sort Array by Increasing Frequency Array FrequencySort Easy πŸ’‘
1646 Array, DP Easy
1662 Check If Two String Arrays are Equivalent Array ArrayStringsAreEqual Easy πŸ’‘
1672 Richest Customer Wealth Array MaximumWealth Easy πŸ’‘
1678 Goal Parser Interpretation Array Interpret Easy πŸ’‘
1684 Count the Number of Consistent Strings Array, Bit Manipulation CountConsistentStrings Easy πŸ’‘
1688 Count of Matches in Tournament Enumeration, Remainder(%) operator NumberOfMatches Easy πŸ’‘
1700 Number of Students Unable to Eat Lunch Queue, Array CountStudents Easy πŸ’‘
1716 Calculate Money in Leetcode Bank Math, Trapezoid formula TotalMoney Easy πŸ’‘
1720 Decode XORed Array Array, Bit Manipulation, XOR Decode Easy πŸ’‘
1748 Sum of Unique Elements Dictionary, Array SumOfUnique Easy πŸ’‘
1763 Divide and Conquer, Bit Manipulation Easy
1768 Merge Strings Alternately String MergeAlternately Easy πŸ’‘
1773 Count Items Matching a Rule List, Array CountMatches Easy πŸ’‘
1784 Check if Binary String Has at Most One Segment of Ones string.IndexOf CheckOnesSegment Easy πŸ’‘
1790 Check if One String Swap Can Make Strings Equal char AreAlmostEqual Easy πŸ’‘
1796 Second Largest Digit in a String HashSet SecondHighest Easy πŸ’‘
1800 Maximum Ascending Subarray Sum Array MaxAscendingSum Easy πŸ’‘
1805 Number of Different Integers in a String String NumDifferentIntegers Easy πŸ’‘
1816 Truncate Sentence Array TruncateSentence Easy πŸ’‘
1822 Sign of the Product of an Array Array ArraySign Easy πŸ’‘
1823 Find the Winner of the Circular Game Array FindTheWinner Medium πŸ’‘
1827 Minimum Operations to Make the Array Increasing Array MinOperations Easy πŸ’‘
1832 Check if the Sentence Is Pangram Dictionary CheckIfPangram Easy πŸ’‘
1837 Sum of Digits in Base K Remainder operator SumBase Easy πŸ’‘
1839 Longest Substring Of All Vowels in Order List LongestBeautifulSubstring Medium πŸ’‘
1844 Replace All Digits with Characters Char, Array ReplaceDigits Easy πŸ’‘
1848 Minimum Distance to the Target Element Array GetMinDistance Easy πŸ’‘
1859
1869
1863 Array, Bit Manipulation Easy
1876
1880
1881

2001-

No. Title Tag Solution Difficulty UnitTest
2001 Array Medium
2006 Count Number of Pairs With Absolute Difference K Array CountKDifference Easy πŸ’‘
2095 Delete the Middle Node of a Linked List Linked List DeleteMiddle Medium πŸ’‘
2206 Array, Bit Manipulation Easy
2220 Bit Manipulation Easy
2239
2248

About

πŸ”‹ LeetCode Practice

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages