⚑ LeetCode Solutions

Easy / Medium / Hard β€” click a card to read the problem, show solution to reveal approach.
Easy #2119 - A Number After a Double Reversal Math β–Έ
Easy AbsoluteDifferenceBetweenMaximumAndMinimumKElements β–Έ
Easy #2806 - Account Balance After Rounded Purchase Math β–Έ
Easy #67 - Add Binary Math, String, Bit Manipulation, Simulation β–Έ
Easy #258 - Add Digits Math, Simulation, Number Theory β–Έ
Easy LeetCode #415 – Add Strings Math, String, Simulation β–Έ
Easy AddToArrayFormOfInteger β–Έ
Easy #2235 - Add Two Integers Math β–Έ
Easy AddTwoPromises β–Έ
Easy #3349 - Adjacent Increasing Subarrays Detection I Array β–Έ
Easy AllowOneFunctionCall β–Έ
Easy #2544 - Alternating Digit Sum Math β–Έ
Easy #3206 - Alternating Groups I Array, Sliding Window β–Έ
Easy AntOnTheBoundary β–Έ
Easy #3074 - Apple Redistribution into Boxes Array, Greedy, Sorting β–Έ
Easy #2460 - Apply Operations to an Array Array, Two Pointers, Simulation β–Έ
Easy ApplyTransformOverEachElementInArray β–Έ
Easy ArrangingCoins β–Έ
Easy Difficulty: Array, Greedy, Sorting, Counting Sort <p>Given an integer array {@code nums} of {@code 2n} integers, group these integers into {@code n} pairs (a1,b1), (a2,b2), ..., (an,bn) such that the sum of min(ai,bi) for all i is maximized. Return the maximized sum. β–Έ
Easy #2619 - Array Prototype Last General β–Έ
Easy #2626 - Array Reduce Transformation General β–Έ
Easy ArrayWrapper β–Έ
Easy AssignCookies β–Έ
Easy AvailableCapturesForRook β–Έ
Easy LeetCode #637 – Average of Levels in Binary Tree Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Easy #1491 - Average Salary Excluding the Minimum and Maximum Salary Array, Sorting β–Έ
Easy #2455 - Average Value of Even Numbers That Are Divisible by Three Array, Math β–Έ
Easy #844 - Backspace String Compare Two Pointers, String, Stack, Simulation β–Έ
Easy #110 - Balanced Binary Tree Tree, Depth-First Search, Binary Tree β–Έ
Easy Base7 β–Έ
Easy BaseballGame β–Έ
Easy #2347 - Best Poker Hand Array, Hash Table, Counting β–Έ
Easy #121 - Best Time to Buy and Sell Stock Array, Dynamic Programming β–Έ
Easy BinaryGap β–Έ
Easy BinaryNumberWithAlternatingBits β–Έ
Easy BinaryPrefixDivisibleBy5 β–Έ
Easy BinarySearch β–Έ
Easy #94 - Binary Tree Inorder Traversal Stack, Tree, Depth-First Search, Binary Tree β–Έ
Easy #257 - Binary Tree Paths String, Backtracking, Tree, Depth-First Search, Binary Tree β–Έ
Easy BinaryTreePostorderTraversal β–Έ
Easy #144 - Binary Tree Preorder Traversal Stack, Tree, Depth-First Search, Binary Tree β–Έ
Easy BinaryTreeTilt β–Έ
Easy BinaryWatch β–Έ
Easy #3478 - BitwiseOrOfEvenNumbersInAnArray Array, Bit Manipulation β–Έ
Easy #859 - Buddy Strings Hash Table, String β–Έ
Easy #1920 - Build Array from Permutation Array, Simulation β–Έ
Easy ButtonWithLongestPushTime β–Έ
Easy #2706 - Buy Two Chocolates Array, Greedy, Sorting β–Έ
Easy #2303 - Calculate Amount Paid in Taxes Array, Simulation β–Έ
Easy #2651 - Calculate Delayed Arrival Time Math β–Έ
Easy #2243 - Calculate Digit Sum of a String String, Simulation β–Έ
Easy #1716 - Calculate Money in Leetcode Bank Math β–Έ
Easy CalculatorWithMethodChaining β–Έ
Easy #1502 - Can Make Arithmetic Progression From Sequence Array, Sorting β–Έ
Easy CanPlaceFlowers β–Έ
Easy #2129 - Capitalize the Title String β–Έ
Easy CategorizeBoxAccordingToCriteria β–Έ
Easy #2194 - Cells in a Range on an Excel Sheet String β–Έ
Easy #1252 - Cells with Odd Values in a Matrix Array, Math, Simulation β–Έ
Easy #1640 - Check Array Formation Through Concatenation Array, Hash Table β–Έ
Easy #3340 - Check Balanced String String β–Έ
Easy #2399 - Check Distances Between Same Letters Array, Hash Table, String β–Έ
Easy CheckDivisibilityByDigitSumAndProduct β–Έ
Easy #2828 - Check if a String Is an Acronym of Words Array, String β–Έ
Easy #1455 - Check If a Word Occurs As a Prefix of Any Word in a Sentence Two Pointers, String, String Matching β–Έ
Easy CheckIfAll1SAreAtLeastLengthKPlacesAway β–Έ
Easy #2124 - Check if All A's Appears Before All B's String β–Έ
Easy #1941 - Check if All Characters Have Equal Number of Occurrences Hash Table, String, Counting β–Έ
Easy CheckIfAllTheIntegersInARangeAreCovered β–Έ
Easy #3334 - CheckIfAnyElementHasPrimeFrequency Array, Hash Table, Math β–Έ
Easy CheckIfArrayIsGood β–Έ
Easy #1752 - Check if Array Is Sorted and Rotated Array β–Έ
Easy #1784 - Check if Binary String Has at Most One Segment of Ones String β–Έ
Easy #2980 - Check if Bitwise OR Has Trailing Zeros Array, Bit Manipulation β–Έ
Easy #3461 - Check If Digits Are Equal in String After Operations I Math, String, Simulation, Combinatorics, Number Theory β–Έ
Easy #2133 - Check if Every Row and Column Contains All Numbers Array, Hash Table, Matrix β–Έ
Easy #3142 - Check if Grid Satisfies Conditions Array, Matrix β–Έ
Easy #1232 - Check If It Is a Straight Line Array, Math, Geometry β–Έ
Easy #2319 - Check if Matrix Is X-Matrix Array, Matrix β–Έ
Easy #1346 - Check If N and Its Double Exist Array, Hash Table, Two Pointers, Binary Search, Sorting β–Έ
Easy #2283 - Check if Number Has Equal Digit Count and Digit Value Hash Table, String, Counting β–Έ
Easy #2042 - Check if Numbers Are Ascending in a Sentence String β–Έ
Easy #1790 - Check if One String Swap Can Make Strings Equal Hash Table, String, Counting β–Έ
Easy #1961 - Check If String Is a Prefix of Array Array, Two Pointers, String β–Έ
Easy CheckIfStringsCanBeMadeEqualWithOperationsI β–Έ
Easy CheckIfTheNumberIsFascinating β–Έ
Easy #1832 - Check if the Sentence Is Pangram Hash Table, String β–Έ
Easy #3274 - Check if Two Chessboard Squares Have the Same Color Math, String β–Έ
Easy #1662 - Check If Two String Arrays are Equivalent Array, String β–Έ
Easy #1880 - Check if Word Equals Summation of Two Words String β–Έ
Easy CheckWhetherTwoStringsAreAlmostEquivalent β–Έ
Easy ChunkArray β–Έ
Easy #2490 - Circular Sentence String β–Έ
Easy #3174 - Clear Digits String, Stack, Simulation β–Έ
Easy #70 - Climbing Stairs Math, Dynamic Programming, Memoization β–Έ
Easy #1009 - Complement of Base 10 Integer Bit Manipulation β–Έ
Easy ComputeAlternatingSum β–Έ
Easy ComputeDecimalRepresentation β–Έ
Easy #3754 - Concatenate Non-Zero Digits and Multiply by Sum I Math β–Έ
Easy #1929 - Concatenation of Array Array, Simulation β–Έ
Easy #1446 - Consecutive Characters String β–Έ
Easy ConstructTheMinimumBitwiseArrayI β–Έ
Easy ConstructTheRectangle β–Έ
Easy #217 - Contains Duplicate Array, Hash Table, Sorting β–Έ
Easy ContainsDuplicateIi β–Έ
Easy #2022 - Convert 1D Array Into 2D Array Array, Matrix, Simulation β–Έ
Easy ConvertANumberToHexadecimal β–Έ
Easy #1290 - Convert Binary Number in a Linked List to Integer Linked List, Math β–Έ
Easy #3280 - Convert Date to Binary Math, String β–Έ
Easy ConvertIntegerToTheSumOfTwoNoZeroIntegers β–Έ
Easy ConvertSortedArrayToBinarySearchTree β–Έ
Easy #2469 - Convert the Temperature Math β–Έ
Easy #2315 - Count Asterisks String β–Έ
Easy CountBinarySubstrings β–Έ
Easy #2085 - Count Common Words With One Occurrence Array, Hash Table, String, Counting β–Έ
Easy CountCompleteTreeNodes Tree, Array, Counting β–Έ
Easy CountDaysSpentTogether β–Έ
Easy CountDistinctNumbersOnBoard β–Έ
Easy CountDominantIndices β–Έ
Easy #3005 - Count Elements With Maximum Frequency Array, Hash Table, Counting β–Έ
Easy #2148 - Count Elements With Strictly Smaller and Greater Elements Array, Sorting, Counting β–Έ
Easy #2176 - Count Equal and Divisible Pairs in an Array Array β–Έ
Easy #1534 - Count Good Triplets Array, Enumeration β–Έ
Easy #2210 - Count Hills and Valleys in an Array Array β–Έ
Easy CountIntegersWithEvenDigitSum β–Έ
Easy #1773 - Count Items Matching a Rule Array, String β–Έ
Easy CountLargestGroup β–Έ
Easy CountMonobitIntegers β–Έ
Easy #1351 - Count Negative Numbers in a Sorted Matrix Array, Binary Search, Matrix β–Έ
Easy #2006 - Count Number of Pairs With Absolute Difference K Array, Hash Table, Counting β–Έ
Easy CountOddNumbersInAnIntervalRange β–Έ
Easy #1688 - Count of Matches in Tournament Math, Simulation β–Έ
Easy #2169 - Count Operations to Obtain Zero Math, Simulation β–Έ
Easy #2506 - Count Pairs Of Similar Strings Array, Hash Table, String, Bit Manipulation, Counting β–Έ
Easy CountPairsThatFormACompleteDayI β–Έ
Easy #2824 - Count Pairs Whose Sum is Less than Target Array, Two Pointers, Binary Search, Sorting β–Έ
Easy #3432 - Count Partitions with Even Sum Difference Array, Math, Prefix Sum β–Έ
Easy CountPrefixAndSuffixPairsI β–Έ
Easy #2255 - Count Prefixes of a Given String Array, String β–Έ
Easy CountResiduePrefixes β–Έ
Easy #1995 - Count Special Quadruplets Array, Hash Table, Enumeration β–Έ
Easy CountSquareSumTriples β–Έ
Easy #3392 - Count Subarrays of Length Three With a Condition Array β–Έ
Easy #3258 - Count Substrings That Satisfy K-Constraint I String, Sliding Window β–Έ
Easy #2843 - Count Symmetric Integers Math, Enumeration β–Έ
Easy #2960 - Count Tested Devices After Test Operations Array, Simulation, Counting β–Έ
Easy #2520 - Count the Digits That Divide a Number Math β–Έ
Easy #1684 - Count the Number of Consistent Strings Array, Hash Table, String, Bit Manipulation, Counting β–Έ
Easy #2970 - Count the Number of Incremovable Subarrays I Array, Two Pointers, Binary Search, Enumeration β–Έ
Easy #3120 - Count the Number of Special Characters I Hash Table, String β–Έ
Easy #2586 - Count the Number of Vowel Strings in Range Array, String, Counting β–Έ
Easy #2062 - Count Vowel Substrings of a String Hash Table, String β–Έ
Easy #2620 - Counter General β–Έ
Easy CounterIi β–Έ
Easy #338 - Counting Bits Dynamic Programming, Bit Manipulation β–Έ
Easy #2185 - Counting Words With a Given Prefix Array, String, String Matching β–Έ
Easy CousinsInBinaryTree β–Έ
Easy #1598 - Crawler Log Folder Array, String, Stack β–Έ
Easy CreateADataframeFromList β–Έ
Easy CreateHelloWorldFunction β–Έ
Easy #1389 - Create Target Array in the Given Order Array, Simulation β–Έ
Easy DayOfTheWeek β–Έ
Easy DayOfTheYear β–Έ
Easy #2325 - Decode the Message Hash Table, String β–Έ
Easy #1720 - Decode XORed Array Array, Bit Manipulation β–Έ
Easy #1313 - Decompress Run-Length Encoded List Array β–Έ
Easy #1309 - Decrypt String from Alphabet to Integer Mapping String β–Έ
Easy #1108 - Defanging an IP Address String β–Έ
Easy #1652 - Defuse the Bomb Array, Sliding Window β–Έ
Easy Explanation: Processes the input in a single pass, applying the core logic to produce the result. β–Έ
Easy #1957 - Delete Characters to Make Fancy String String β–Έ
Easy #944 - Delete Columns to Make Sorted Array, String β–Έ
Easy #2500 - Delete Greatest Value in Each Row Array, Sorting, Heap (Priority Queue), Matrix, Simulation β–Έ
Easy DesignAnOrderedStream β–Έ
Easy DesignHashmap β–Έ
Easy DesignHashset β–Έ
Easy #3242 - Design Neighbor Sum Service Array, Hash Table, Design, Matrix, Simulation β–Έ
Easy DesignParkingSystem β–Έ
Easy #1436 - Destination City Array, Hash Table, String β–Έ
Easy DetectCapital β–Έ
Easy #1566 - Detect Pattern of Length M Repeated K or More Times Array, Enumeration β–Έ
Easy #1812 - Determine Color of a Chessboard Square Math, String β–Έ
Easy #1704 - Determine if String Halves Are Alike String, Counting β–Έ
Easy #2446 - Determine if Two Events Have Conflict Array, String β–Έ
Easy #2660 - Determine the Winner of a Bowling Game Array, Simulation β–Έ
Easy #1886 - Determine Whether Matrix Can Be Obtained By Rotation Array, Matrix β–Έ
Easy #942 - DI String Match Array, Two Pointers, String, Greedy β–Έ
Easy DiameterOfBinaryTree β–Έ
Easy #2535 - Difference Between Element Sum and Digit Sum of an Array Array, Math β–Έ
Easy DistanceBetweenBusStops β–Έ
Easy DistributeCandies β–Έ
Easy #2928 - Distribute Candies Among Children I Math, Combinatorics, Enumeration β–Έ
Easy #1103 - Distribute Candies to People Math, Simulation β–Έ
Easy #3069 - Distribute Elements Into Two Arrays I Array, Simulation β–Έ
Easy #2591 - Distribute Money to Maximum Children Math, Greedy β–Έ
Easy #2138 - Divide a String Into Groups of Size k String, Simulation β–Έ
Easy #3010 - Divide an Array Into Subarrays With Minimum Cost I Array, Sorting, Enumeration β–Έ
Easy #2206 - Divide Array Into Equal Pairs Array, Hash Table, Bit Manipulation, Counting β–Έ
Easy #2894 - Divisible and Non-divisible Sums Difference Math β–Έ
Easy #1025 - Divisor Game Math, Dynamic Programming, Brainteaser, Game Theory β–Έ
Easy #1089 - Duplicate Zeros Array, Two Pointers β–Έ
Easy #3633 - Earliest Finish Time for Land and Water Rides I Array, Two Pointers, Binary Search, Greedy, Sorting β–Έ
Easy EarliestTimeToFinishOneTask β–Έ
Easy #1287 - ElementAppearingMoreThan25InSortedArray Array β–Έ
Easy EqualScoreSubstrings String, Sliding Window, HashSet β–Έ
Easy #2331 - Evaluate Boolean Binary Tree Tree, Depth-First Search, Binary Tree β–Έ
Easy #171 - Excel Sheet Column Number Math, String β–Έ
Easy #168 - Excel Sheet Column Title Math, String β–Έ
Easy #3083 - Existence of a Substring in a String and Its Reverse Hash Table, String β–Έ
Easy FairCandySwap β–Έ
Easy #2810 - Faulty Keyboard String, Simulation β–Έ
Easy FibonacciNumber β–Έ
Easy FilterElementsFromArray β–Έ
Easy #3264 - Final Array State After K Multiplication Operations I Array, Math, Heap (Priority Queue), Simulation β–Έ
Easy #1475 - Final Prices With a Special Discount in a Shop Array, Stack, Monotonic Stack β–Έ
Easy #2011 - Final Value of Variable After Performing Operations Array, String, Simulation β–Έ
Easy FindACorrespondingNodeOfABinaryTreeInACloneOfThatTree β–Έ
Easy #2200 - Find All K-Distant Indices in an Array Array, Two Pointers β–Έ
Easy FindAllNumbersDisappearedInAnArray β–Έ
Easy FindCenterOfStarGraph β–Έ
Easy #2923 - Find Champion I Array, Matrix β–Έ
Easy #2239 - Find Closest Number to Zero Array β–Έ
Easy #3516 - Find Closest Person Math β–Έ
Easy #1002 - Find Common Characters Array, Hash Table, String β–Έ
Easy #2956 - Find Common Elements Between Two Arrays Array, Hash Table β–Έ
Easy #2108 - Find First Palindromic String in the Array Array, Two Pointers, String β–Έ
Easy #1979 - Find Greatest Common Divisor of Array Array, Math, Number Theory β–Έ
Easy #3232 - Find if Digit Game Can Be Won Array, Math β–Έ
Easy #1971 - Find if Path Exists in Graph Depth-First Search, Breadth-First Search, Union-Find, Graph Theory β–Έ
Easy FindIndicesOfStableMountains β–Έ
Easy FindIndicesWithIndexAndValueDifferenceI β–Έ
Easy #1394 - Find Lucky Integer in an Array Array, Hash Table, Counting β–Έ
Easy FindMaximumNumberOfStringPairs β–Έ
Easy FindMinimumLogTransportationCost β–Έ
Easy #3190 - Find Minimum Operations to Make All Elements Divisible by Three Array, Math β–Έ
Easy #2965 - Find Missing and Repeated Values Array, Hash Table, Math, Matrix β–Έ
Easy #3731 - Find Missing Elements Array, Hash Table, Sorting β–Έ
Easy FindModeInBinarySearchTree β–Έ
Easy #3541 - Find Most Frequent Vowel and Consonant Hash Table, String, Counting β–Έ
Easy #1304 - Find N Unique Integers Sum up to Zero Array, Math β–Έ
Easy #1779 - Find Nearest Point That Has the Same X or Y Coordinate Array β–Έ
Easy #1295 - Find Numbers with Even Number of Digits Array, Math β–Έ
Easy FindPivotIndex β–Έ
Easy FindResultantArrayAfterRemovingAnagrams β–Έ
Easy FindSmallestLetterGreaterThanTarget β–Έ
Easy FindSpecialSubstringOfLengthK β–Έ
Easy #2395 - Find Subarrays With Equal Sum Array, Hash Table β–Έ
Easy FindSubsequenceOfLengthKWithTheLargestSum β–Έ
Easy #2089 - Find Target Indices After Sorting Array Array, Binary Search, Sorting β–Έ
Easy #2562 - Find the Array Concatenation Value Array, Two Pointers, Simulation β–Έ
Easy FindTheChildWhoHasTheBallAfterKSeconds β–Έ
Easy #389 - Find the Difference Hash Table, String, Bit Manipulation, Sorting β–Έ
Easy #2215 - Find the Difference of Two Arrays Array, Hash Table β–Έ
Easy #1385 - Find the Distance Value Between Two Arrays Array, Two Pointers, Binary Search, Sorting β–Έ
Easy #2670 - Find the Distinct Difference Array Array, Hash Table β–Έ
Easy #3210 - Find the Encrypted String String β–Έ
Easy #1732 - Find the Highest Altitude Array, Prefix Sum β–Έ
Easy #28 - Find the Index of the First Occurrence in a String Two Pointers, String, String Matching β–Έ
Easy #3131 - Find the Integer Added to Array I Array β–Έ
Easy #2269 - Find the K-Beauty of a Number Math, String, Sliding Window β–Έ
Easy #2917 - Find the K-or of an Array Array, Bit Manipulation β–Έ
Easy #3304 - Find the K-th Character in String Game I Math, Bit Manipulation, Recursion, Simulation β–Έ
Easy #3270 - Find the Key of the Numbers Math β–Έ
Easy FindTheLargestAlmostMissingInteger β–Έ
Easy FindTheLeastFrequentDigit β–Έ
Easy #2609 - Find the Longest Balanced Substring of a Binary String String β–Έ
Easy #2682 - Find the Losers of the Circular Game Array, Hash Table, Simulation β–Έ
Easy #2769 - Find the Maximum Achievable Number Math β–Έ
Easy FindTheMaximumDivisibilityScore β–Έ
Easy #1991 - Find the Middle Index in Array Array, Prefix Sum β–Έ
Easy #3162 - Find the Number of Good Pairs I Array, Hash Table β–Έ
Easy #3238 - Find the Number of Winning Players Array, Hash Table, Counting β–Έ
Easy #3330 - Find the Original Typed String I String β–Έ
Easy #2951 - Find the Peaks Array, Enumeration β–Έ
Easy #2485 - Find the Pivot Integer Math, Prefix Sum β–Έ
Easy FindTheSumOfEncryptedIntegers β–Έ
Easy #997 - Find the Town Judge Array, Hash Table, Graph Theory β–Έ
Easy #2639 - Find the Width of Columns of a Grid Array, Matrix β–Έ
Easy #3222 - Find the Winning Player in Coin Game Math, Simulation, Game Theory β–Έ
Easy FindTheXorOfNumbersWhichAppearTwice β–Έ
Easy #3793 - Find Users with High Token Usage General β–Έ
Easy FindValidEmails β–Έ
Easy FindValidPairOfAdjacentDigitsInString β–Έ
Easy #1275 - Find Winner on a Tic Tac Toe Game Array, Hash Table, Matrix, Simulation β–Έ
Easy #2942 - Find Words Containing Character Array, String β–Έ
Easy #1160 - Find Words That Can Be Formed by Characters Array, Hash Table, String, Counting β–Έ
Easy #3318 - Find X-Sum of All K-Long Subarrays I Array, Hash Table, Sliding Window, Heap (Priority Queue) β–Έ
Easy #2094 - Finding 3-Digit Even Numbers Array, Hash Table, Recursion, Sorting, Enumeration β–Έ
Easy #278 - First Bad Version Binary Search, Interactive β–Έ
Easy #2351 - First Letter to Appear Twice Hash Table, String, Bit Manipulation, Counting β–Έ
Easy #387 - First Unique Character in a String Hash Table, String, Queue, Counting β–Έ
Easy FizzBuzz β–Έ
Easy FlipSquareSubmatrixVertically β–Έ
Easy #832 - Flipping an Image Array, Two Pointers, Bit Manipulation, Matrix, Simulation β–Έ
Easy FloodFill β–Έ
Easy #2605 - Form Smallest Number From Two Digit Arrays Array, Hash Table, Enumeration β–Έ
Easy FruitsIntoBasketsIi β–Έ
Easy FunctionComposition β–Έ
Easy #2833 - Furthest Point From Origin String, Counting β–Έ
Easy GcdOfOddAndEvenSums β–Έ
Easy #1374 - Generate a String With Characters That Have Odd Counts String β–Έ
Easy GenerateFibonacciSequence β–Έ
Easy GenerateTagForVideoCaption β–Έ
Easy #1646 - Get Maximum in Generated Array Array, Simulation β–Έ
Easy #1678 - Goal Parser Interpretation String β–Έ
Easy #824 - Goat Latin String β–Έ
Easy #1071 - Greatest Common Divisor of Strings Math, String β–Έ
Easy #2309 - Greatest English Letter in Upper and Lower Case Hash Table, String, Enumeration β–Έ
Easy GuessNumberHigherOrLower β–Έ
Easy HammingDistance β–Έ
Easy #202 - Happy Number Hash Table, Math, Two Pointers β–Έ
Easy #3099 - Harshad Number Math β–Έ
Easy #1051 - Height Checker Array, Sorting, Counting Sort β–Έ
Easy HexadecimalAndHexatrigesimalConversion Math, String, Base Conversion β–Έ
Easy #1365 - How Many Numbers Are Smaller Than the Current Number Array, Hash Table, Sorting, Counting Sort β–Έ
Easy ImageSmoother β–Έ
Easy ImplementQueueUsingStacks β–Έ
Easy ImplementStackUsingQueues β–Έ
Easy #1370 - Increasing Decreasing String Hash Table, String, Counting β–Έ
Easy IncreasingOrderSearchTree β–Έ
Easy #2248 - Intersection of Multiple Arrays Array, Hash Table, Sorting, Counting β–Έ
Easy #349 - Intersection of Two Arrays Array, Hash Table, Two Pointers, Binary Search, Sorting β–Έ
Easy #350 - Intersection of Two Arrays II Array, Hash Table, Two Pointers, Binary Search, Sorting β–Έ
Easy #160 - Intersection of Two Linked Lists Hash Table, Linked List, Two Pointers β–Έ
Easy IntervalCancellation β–Έ
Easy #226 - Invert Binary Tree Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Easy IsObjectEmpty Array, Simulation β–Έ
Easy #392 - Is Subsequence Two Pointers, String, Dynamic Programming β–Έ
Easy IslandPerimeter β–Έ
Easy #205 - Isomorphic Strings Hash Table, String β–Έ
Easy JewelsAndStones β–Έ
Easy #2600 - K Items With the Maximum Sum Math, Greedy β–Έ
Easy #2154 - Keep Multiplying Found Values by Two Array, Hash Table, Sorting, Simulation β–Έ
Easy KeyboardRow β–Έ
Easy #1431 - Kids With the Greatest Number of Candies Array β–Έ
Easy #2053 - Kth Distinct String in an Array Array, Hash Table, String, Counting β–Έ
Easy KthLargestElementInAStream β–Έ
Easy #1539 - Kth Missing Positive Number Array, Binary Search β–Έ
Easy #2264 - Largest 3-Same-Digit Number in String String β–Έ
Easy LargestEvenNumber β–Έ
Easy #2373 - Largest Local Values in a Matrix Array, Matrix β–Έ
Easy LargestNumberAfterDigitSwapsByParity β–Έ
Easy LargestNumberAtLeastTwiceOfOthers β–Έ
Easy #1903 - Largest Odd Number in String Math, String, Greedy β–Έ
Easy LargestPerimeterTriangle β–Έ
Easy #2441 - Largest Positive Integer That Exists With Its Negative Array, Hash Table, Two Pointers, Sorting β–Έ
Easy #1624 - Largest Substring Between Two Equal Characters Hash Table, String β–Έ
Easy LargestTriangleArea β–Έ
Easy #1046 - Last Stone Weight Array, Heap (Priority Queue) β–Έ
Easy LastVisitedIntegers β–Έ
Easy #1736 - Latest Time by Replacing Hidden Digits String, Greedy β–Έ
Easy LatestTimeYouCanObtainAfterReplacingCharacters β–Έ
Easy LeafSimilarTrees Tree, Array, Comparison β–Έ
Easy #2574 - Left and Right Sum Differences Array, Prefix Sum β–Έ
Easy #860 - Lemonade Change Array, Greedy β–Έ
Easy #58 - Length of Last Word String β–Έ
Easy #2697 - Lexicographically Smallest Palindrome Two Pointers, String, Greedy β–Έ
Easy #3216 - Lexicographically Smallest String After a Swap String, Greedy β–Έ
Easy LicenseKeyFormatting β–Έ
Easy #141 - Linked List Cycle Hash Table, Linked List, Two Pointers β–Έ
Easy #925 - Long Pressed Name Two Pointers, String β–Έ
Easy #1869 - Longer Contiguous Segments of Ones than Zeros String β–Έ
Easy LongestAlternatingSubarray β–Έ
Easy #14 - Longest Common Prefix Array, String, Trie β–Έ
Easy LongestContinuousIncreasingSubsequence β–Έ
Easy #2760 - Longest Even Odd Subarray With Threshold Array, Sliding Window β–Έ
Easy LongestHarmoniousSubsequence β–Έ
Easy #1763 - LongestNiceSubstring String, Divide and Conquer, Bit Manipulation β–Έ
Easy LongestPalindrome β–Έ
Easy LongestStrictlyIncreasingOrStrictlyDecreasingSubarray β–Έ
Easy #2389 - Longest Subsequence With Limited Sum Array, Binary Search, Greedy, Sorting, Prefix Sum β–Έ
Easy LongestUncommonSubsequenceI β–Έ
Easy #2900 - Longest Unequal Adjacent Groups Subsequence I Array, String, Dynamic Programming, Greedy β–Έ
Easy #1380 - Lucky Numbers in a Matrix Array, Matrix β–Έ
Easy #169 - Majority Element Array, Hash Table, Divide and Conquer, Sorting, Counting β–Έ
Easy MajorityFrequencyCharacters β–Έ
Easy MakeASquareWithTheSameColor β–Έ
Easy #3354 - Make Array Elements Equal to Zero Array, Simulation, Prefix Sum β–Έ
Easy #2357 - Make Array Zero by Subtracting Equal Amounts Array, Hash Table, Greedy, Sorting, Heap (Priority Queue), Simulation β–Έ
Easy #1544 - Make The String Great String, Stack β–Έ
Easy MakeThreeStringsEqual β–Έ
Easy #1460 - Make Two Arrays Equal by Reversing Subarrays Array, Hash Table, Sorting β–Έ
Easy MatrixCellsInDistanceOrder β–Έ
Easy #1572 - Matrix Diagonal Sum Array, Matrix β–Έ
Easy #2946 - Matrix Similarity After Cyclic Shifts Array, Math, Matrix, Simulation β–Έ
Easy MaxConsecutiveOnes β–Έ
Easy #2815 - Max Pair Sum in an Array Array, Hash Table β–Έ
Easy #3745 - Maximize Expression of Three Elements Array, Greedy, Sorting, Enumeration β–Έ
Easy MaximizeSumOfArrayAfterKNegations β–Έ
Easy MaximizeSumOfAtMostKDistinctElements β–Έ
Easy #1323 - Maximum 69 Number Math, Greedy β–Έ
Easy #3000 - Maximum Area of Longest Diagonal Rectangle Array β–Έ
Easy #1800 - Maximum Ascending Subarray Sum Array β–Έ
Easy MaximumAverageSubarrayI β–Έ
Easy #3492 - Maximum Containers on a Ship Math β–Έ
Easy #2529 - Maximum Count of Positive Integer and Negative Integer Array, Binary Search, Counting β–Έ
Easy #104 - Maximum Depth of Binary Tree Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Easy MaximumDepthOfNAryTree β–Έ
Easy #3423 - Maximum Difference Between Adjacent Elements in a Circular Array Array β–Έ
Easy #3442 - Maximum Difference Between Even and Odd Frequency I Hash Table, String, Counting β–Έ
Easy #2016 - Maximum Difference Between Increasing Elements Array β–Έ
Easy #2566 - Maximum Difference by Remapping a Digit Math, Greedy β–Έ
Easy #2511 - Maximum Enemy Forts That Can Be Captured Array, Two Pointers β–Έ
Easy MaximumHeightOfATriangle β–Έ
Easy #3090 - Maximum Length Substring With Two Occurrences Hash Table, String, Sliding Window β–Έ
Easy #1614 - Maximum Nesting Depth of the Parentheses String, Stack β–Έ
Easy #1189 - Maximum Number of Balloons Hash Table, String, Counting β–Έ
Easy #1742 - Maximum Number of Balls in a Box Hash Table, Math, Counting β–Έ
Easy #3038 - Maximum Number of Operations With the Same Score I Array, Simulation β–Έ
Easy #2341 - Maximum Number of Pairs in Array Array, Hash Table, Counting β–Έ
Easy #2114 - Maximum Number of Words Found in Sentences Array, String β–Έ
Easy MaximumNumberOfWordsYouCanType β–Έ
Easy #2864 - Maximum Odd Binary Number Math, String, Greedy β–Έ
Easy #1854 - Maximum Population Year Array, Counting, Prefix Sum β–Έ
Easy #1913 - Maximum Product Difference Between Two Pairs Array, Sorting β–Έ
Easy MaximumProductOfThreeNumbers β–Έ
Easy MaximumProductOfTwoDigits β–Έ
Easy #1464 - Maximum Product of Two Elements in an Array Array, Sorting, Heap (Priority Queue) β–Έ
Easy #1668 - Maximum Repeating Substring String, Dynamic Programming, String Matching β–Έ
Easy MaximumScoreAfterSplittingAString β–Έ
Easy #2932 - Maximum Strong Pair XOR I Array, Hash Table, Bit Manipulation, Trie, Sliding Window β–Έ
Easy #3411 - MaximumSubarrayWithEqualProducts Array, Math, Sliding Window β–Έ
Easy #2656 - Maximum Sum With Exactly K Elements Array, Greedy β–Έ
Easy #3487 - Maximum Unique Subarray Sum After Deletion Array, Hash Table, Greedy β–Έ
Easy #1710 - Maximum Units on a Truck Array, Greedy, Sorting β–Έ
Easy #2496 - Maximum Value of a String in an Array Array, String β–Έ
Easy #2873 - Maximum Value of an Ordered Triplet I Array β–Έ
Easy MeanOfArrayAfterRemovingSomeElements β–Έ
Easy #2363 - Merge Similar Items Array, Hash Table, Sorting, Ordered Set β–Έ
Easy #88 - Merge Sorted Array Array, Two Pointers, Sorting β–Έ
Easy #1768 - Merge Strings Alternately Two Pointers, String β–Έ
Easy #2570 - Merge Two 2D Arrays by Summing Values Array, Hash Table, Two Pointers β–Έ
Easy MergeTwoBinaryTrees β–Έ
Easy #21 - Merge Two Sorted Lists Linked List, Recursion β–Έ
Easy #876 - Middle of the Linked List Linked List, Two Pointers β–Έ
Easy MinCostClimbingStairs β–Έ
Easy #2293 - Min Max Game Array, Simulation β–Έ
Easy #2716 - Minimize String Length Hash Table, String β–Έ
Easy #1200 - Minimum Absolute Difference Array, Sorting β–Έ
Easy MinimumAbsoluteDifferenceInBst β–Έ
Easy #2335 - Minimum Amount of Time to Fill Cups Array, Greedy, Sorting, Heap (Priority Queue) β–Έ
Easy MinimumAverageOfSmallestAndLargestElements β–Έ
Easy #2220 - Minimum Bit Flips to Convert Number Bit Manipulation β–Έ
Easy #1758 - Minimum Changes To Make Alternating Binary String String β–Έ
Easy #2540 - Minimum Common Value Array, Hash Table, Two Pointers, Binary Search β–Έ
Easy #2144 - Minimum Cost of Buying Candies With Discount Array, Greedy, Sorting β–Έ
Easy #1217 - Minimum Cost to Move Chips to The Same Position Array, Math, Greedy β–Έ
Easy MinimumCostToReachEveryPosition β–Έ
Easy #2481 - Minimum Cuts to Divide a Circle Math, Geometry β–Έ
Easy MinimumDeletionsForAtMostKDistinctCharacters β–Έ
Easy #111 - Minimum Depth of Binary Tree Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Easy #1984 - Minimum Difference Between Highest and Lowest of K Scores Array, Sliding Window, Sorting β–Έ
Easy MinimumDistanceBetweenBstNodes β–Έ
Easy MinimumDistanceBetweenThreeEqualElementsI β–Έ
Easy #1848 - Minimum Distance to the Target Element Array β–Έ
Easy #3300 - Minimum Element After Replacement With Digit Sum Array, Math β–Έ
Easy MinimumHoursOfTrainingToWinACompetition β–Έ
Easy MinimumIndexSumOfTwoLists β–Έ
Easy #2027 - Minimum Moves to Convert String String, Greedy β–Έ
Easy MinimumMovesToEqualArrayElementsIii β–Έ
Easy #2974 - Minimum Number Game Array, Sorting, Heap (Priority Queue), Simulation β–Έ
Easy MinimumNumberOfChairsInAWaitingRoom β–Έ
Easy MinimumNumberOfFlipsToReverseBinaryString β–Έ
Easy #2037 - Minimum Number of Moves to Seat Everyone Array, Greedy, Sorting, Counting Sort β–Έ
Easy #2224 - Minimum Number of Operations to Convert Time String, Greedy β–Έ
Easy #3396 - Minimum Number of Operations to Make Elements in Array Distinct Array, Hash Table β–Έ
Easy #3014 - Minimum Number of Pushes to Type Word I Math, String, Greedy β–Έ
Easy #2869 - Minimum Operations to Collect Elements Array, Hash Table, Bit Manipulation β–Έ
Easy MinimumOperationsToEqualizeArray β–Έ
Easy #3065 - Minimum Operations to Exceed Threshold Value I Array β–Έ
Easy MinimumOperationsToMakeArraySumDivisibleByK β–Έ
Easy #3375 - Minimum Operations to Make Array Values Equal to K Array, Hash Table β–Έ
Easy MinimumOperationsToMakeColumnsStrictlyIncreasing β–Έ
Easy #1827 - Minimum Operations to Make the Array Increasing Array, Greedy β–Έ
Easy #3507 - Minimum Pair Removal to Sort Array I Array, Hash Table, Linked List, Heap (Priority Queue), Simulation, Doubly-Linked List, Ordered Set β–Έ
Easy MinimumPositiveSumSubarray Array, Sliding Window, Brute Force β–Έ
Easy #2379 - Minimum Recolors to Get K Consecutive Black Blocks String, Sliding Window β–Έ
Easy #2855 - Minimum Right Shifts to Sort the Array Array β–Έ
Easy MinimumStringLengthAfterRemovingSubstrings β–Έ
Easy #1403 - Minimum Subsequence in Non-Increasing Order Array, Greedy, Sorting β–Έ
Easy #2160 - Minimum Sum of Four Digit Number After Splitting Digits Math, Greedy, Sorting β–Έ
Easy #2908 - Minimum Sum of Mountain Triplets I Array β–Έ
Easy #1974 - Minimum Time to Type Word Using Special Typewriter String, Greedy β–Έ
Easy #1266 - Minimum Time Visiting All Points Array, Math, Geometry β–Έ
Easy #1413 - Minimum Value to Get Positive Step by Step Sum Array, Prefix Sum β–Έ
Easy MirrorDistanceOfAnInteger β–Έ
Easy #268 - Missing Number Array, Hash Table, Math, Binary Search, Bit Manipulation, Sorting β–Έ
Easy #3033 - Modify the Matrix Array, Matrix β–Έ
Easy #896 - Monotonic Array Array β–Έ
Easy #819 - MostCommonWord Array, Hash Table, String, Counting β–Έ
Easy #2404 - Most Frequent Even Element Array, Hash Table, Counting β–Έ
Easy MostFrequentNumberFollowingKeyInAnArray β–Έ
Easy #1560 - Most Visited Sector in a Circular Track Array, Simulation β–Έ
Easy #283 - Move Zeroes Array, Two Pointers β–Έ
Easy NAryTreePostorderTraversal β–Έ
Easy NAryTreePreorderTraversal β–Έ
Easy #961 - N-Repeated Element in Size 2N Array Array, Hash Table β–Έ
Easy #1137 - N-th Tribonacci Number Math, Dynamic Programming, Memoization β–Έ
Easy NeitherMinimumNorMaximum β–Έ
Easy NextGreaterElementI β–Έ
Easy #292 - Nim Game Math, Brainteaser, Game Theory β–Έ
Easy NumberComplement β–Έ
Easy #191 - Number of 1 Bits Divide and Conquer, Bit Manipulation β–Έ
Easy NumberOfArithmeticTriplets β–Έ
Easy #2748 - Number of Beautiful Pairs Array, Hash Table, Math, Counting, Number Theory β–Έ
Easy #3226 - Number of Bit Changes to Make Two Integers Equal Bit Manipulation β–Έ
Easy #3019 - Number of Changing Keys String β–Έ
Easy #2427 - Number of Common Factors Math, Enumeration, Number Theory β–Έ
Easy #1360 - Number of Days Between Two Dates Math, String β–Έ
Easy #1805 - Number of Different Integers in a String Hash Table, String β–Έ
Easy NumberOfDistinctAverages β–Έ
Easy #2798 - Number of Employees Who Met the Target Array β–Έ
Easy #1128 - Number of Equivalent Domino Pairs Array, Hash Table, Counting β–Έ
Easy #2595 - Number of Even and Odd Bits Bit Manipulation β–Έ
Easy #1512 - Number of Good Pairs Array, Hash Table, Math, Counting β–Έ
Easy NumberOfLinesToWriteString String, Greedy, Array β–Έ
Easy #933 - Number of Recent Calls Design, Queue, Data Stream β–Έ
Easy #1725 - Number Of Rectangles That Can Form The Largest Square Array β–Έ
Easy NumberOfSegmentsInAString β–Έ
Easy #2678 - Number of Senior Citizens Array, String β–Έ
Easy #1342 - Number of Steps to Reduce a Number to Zero Math, Bit Manipulation β–Έ
Easy #1967 - Number of Strings That Appear as Substrings in Word Array, String β–Έ
Easy #1450 - Number of Students Doing Homework at a Given Time Array β–Έ
Easy #1700 - Number of Students Unable to Eat Lunch Array, Stack, Queue, Simulation β–Έ
Easy #2475 - Number of Unequal Triplets in Array Array, Hash Table, Sorting β–Έ
Easy #2437 - Number of Valid Clock Times String, Enumeration β–Έ
Easy #2047 - Number of Valid Words in a Sentence String β–Έ
Easy OccurrencesAfterBigram β–Έ
Easy OddStringDifference β–Έ
Easy P1BitAnd2BitCharacters β–Έ
Easy #234 - Palindrome Linked List Linked List, Two Pointers, Stack, Recursion β–Έ
Easy #9 - Palindrome Number Math β–Έ
Easy PartitionArrayIntoThreePartsWithEqualSum β–Έ
Easy #118 - Pascal's Triangle Array, Dynamic Programming β–Έ
Easy #119 - Pascal's Triangle II Array, Dynamic Programming β–Έ
Easy PassThePillow β–Έ
Easy #1496 - Path Crossing Hash Table, String β–Έ
Easy #112 - Path Sum Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Easy #2278 - Percentage of Letter in String String β–Έ
Easy PerfectNumber β–Έ
Easy PermutationDifferenceBetweenTwoStrings β–Έ
Easy #66 - Plus One Array, Math β–Έ
Easy #2848 - Points That Intersect With Cars Array, Hash Table, Prefix Sum β–Έ
Easy PositionsOfLargeGroups β–Έ
Easy #342 - Power of Four Math, Bit Manipulation, Recursion β–Έ
Easy #326 - Power of Three Math, Recursion β–Έ
Easy #231 - PowerOfTwo Math, Bit Manipulation, Recursion β–Έ
Easy #1175 - Prime Arrangements Math β–Έ
Easy #2614 - Prime In Diagonal Array, Math, Matrix, Number Theory β–Έ
Easy PrimeNumberOfSetBitsInBinaryRepresentation β–Έ
Easy PrintInOrder β–Έ
Easy ProjectionAreaOf3dShapes β–Έ
Easy RangeAdditionIi β–Έ
Easy #938 - Range Sum of BST Tree, Depth-First Search, Binary Search Tree, Binary Tree β–Έ
Easy #303 - Range Sum Query - Immutable Array, Design, Prefix Sum β–Έ
Easy RankTransformOfAnArray β–Έ
Easy #383 - Ransom Note Hash Table, String, Counting β–Έ
Easy #2287 - Rearrange Characters to Make Target String Hash Table, String, Counting β–Έ
Easy #1592 - Rearrange Spaces Between Words String β–Έ
Easy #836 - Rectangle Overlap Math, Geometry β–Έ
Easy #1897 - Redistribute Characters to Make All Strings Equal Hash Table, String, Counting β–Έ
Easy #1507 - Reformat Date String β–Έ
Easy #1694 - Reformat Phone Number String β–Έ
Easy ReformatTheString β–Έ
Easy RelativeRanks β–Έ
Easy RelativeSortArray β–Έ
Easy #1047 - Remove All Adjacent Duplicates In String String, Stack β–Έ
Easy #2259 - Remove Digit From Number to Maximize Result String, Greedy, Enumeration β–Έ
Easy #26 - Remove Duplicates from Sorted Array Array, Two Pointers β–Έ
Easy #83 - Remove Duplicates from Sorted List Linked List β–Έ
Easy #27 - Remove Element Array, Two Pointers β–Έ
Easy #2423 - Remove Letter To Equalize Frequency Hash Table, String, Counting β–Έ
Easy #203 - Remove Linked List Elements Linked List, Recursion β–Έ
Easy #1909 - Remove One Element to Make the Array Strictly Increasing Array β–Έ
Easy #1021 - Remove Outermost Parentheses String, Stack β–Έ
Easy #1332 - Remove Palindromic Subsequences Two Pointers, String β–Έ
Easy #2710 - Remove Trailing Zeros From a String String β–Έ
Easy RemoveZerosInDecimalRepresentation β–Έ
Easy RepeatedSubstringPattern β–Έ
Easy #1844 - Replace All Digits with Characters String β–Έ
Easy #1576 - Replace All ?'s to Avoid Consecutive Repeating Characters String β–Έ
Easy #1299 - Replace Elements with Greatest Element on Right Side Array β–Έ
Easy ReshapeTheMatrix β–Έ
Easy #3468 - RestoreFinishingOrder Array, Hash Table, Sorting β–Έ
Easy ReturnLengthOfArgumentsPassed Array, Simulation β–Έ
Easy #190 - Reverse Bits Divide and Conquer, Bit Manipulation β–Έ
Easy ReverseDegreeOfAString β–Έ
Easy ReverseLettersThenSpecialCharactersInAString β–Έ
Easy #206 - Reverse Linked List Linked List, Recursion β–Έ
Easy #917 - Reverse Only Letters Two Pointers, String β–Έ
Easy #2000 - Reverse Prefix of Word Two Pointers, String, Stack β–Έ
Easy #344 - Reverse String Two Pointers, String β–Έ
Easy ReverseStringIi β–Έ
Easy ReverseStringPrefix β–Έ
Easy #345 - Reverse Vowels of a String Two Pointers, String β–Έ
Easy ReverseWordsInAStringIii β–Έ
Easy #1672 - Richest Customer Wealth Array, Matrix β–Έ
Easy RingsAndRods β–Έ
Easy RobotReturnToOrigin β–Έ
Easy #13 - Roman to Integer Hash Table, Math, String β–Έ
Easy #2236 - Root Equals Sum of Children Tree, Binary Tree β–Έ
Easy RotateString β–Έ
Easy #2643 - Row With Maximum Ones Array, Matrix β–Έ
Easy #1480 - Running Sum of 1d Array Array, Prefix Sum β–Έ
Easy #100 - Same Tree Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Easy ScoreOfAString β–Έ
Easy SearchInABinarySearchTree β–Έ
Easy #35 - Search Insert Position Array, Binary Search β–Έ
Easy #1796 - Second Largest Digit in a String Hash Table, String β–Έ
Easy SecondMinimumNodeInABinaryTree β–Έ
Easy SelfDividingNumbers β–Έ
Easy #2717 - Semi-Ordered Permutation Array, Simulation β–Έ
Easy #2553 - Separate the Digits in an Array Array, Simulation β–Έ
Easy SetMismatch β–Έ
Easy #1260 - Shift 2D Grid Array, Matrix, Simulation β–Έ
Easy ShortestCompletingWord β–Έ
Easy #821 - Shortest Distance to a Character Array, Two Pointers, String β–Έ
Easy #2515 - Shortest Distance to Target String in a Circular Array Array, String β–Έ
Easy #3095 - Shortest Subarray With OR at Least K I Array, Bit Manipulation, Sliding Window β–Έ
Easy #1528 - Shuffle String Array, String β–Έ
Easy #1470 - Shuffle the Array Array β–Έ
Easy #1822 - Sign of the Product of an Array Array, Math β–Έ
Easy #136 - Single Number Array, Bit Manipulation β–Έ
Easy Sleep β–Έ
Easy #1629 - Slowest Key Array, String β–Έ
Easy SmallestAbsentPositiveGreaterThanAverage β–Έ
Easy #3345 - Smallest Divisible Digit Product I Math, Enumeration β–Έ
Easy #2413 - Smallest Even Multiple Math, Number Theory β–Έ
Easy #3550 - Smallest Index With Digit Sum Equal to Index Array, Math β–Έ
Easy #2057 - Smallest Index With Equal Value Array β–Έ
Easy #2996 - Smallest Missing Integer Greater Than Sequential Prefix Sum Array, Hash Table, Sorting β–Έ
Easy #2195 - SmallestMissingMultipleOfK Array, Math β–Έ
Easy #3370 - Smallest Number With All Set Bits Math, Bit Manipulation β–Έ
Easy SmallestPairWithDifferentFrequencies β–Έ
Easy SmallestRangeI β–Έ
Easy #3248 - Snake in Matrix Array, String, Simulation β–Έ
Easy #1636 - Sort Array by Increasing Frequency Array, Hash Table, Sorting β–Έ
Easy #905 - Sort Array By Parity Array, Two Pointers, Sorting β–Έ
Easy #922 - Sort Array By Parity II Array, Two Pointers, Sorting β–Έ
Easy #2724 - Sort By General β–Έ
Easy #2164 - Sort Even and Odd Indices Independently Array, Sorting β–Έ
Easy #3769 - Sort Integers by Binary Reflection Array, Sorting β–Έ
Easy #1356 - Sort Integers by The Number of 1 Bits Array, Bit Manipulation, Sorting, Counting β–Έ
Easy #2418 - Sort the People Array, Hash Table, String, Sorting β–Έ
Easy #1859 - Sorting the Sentence String, Sorting β–Έ
Easy #3151 - Special Array I Array β–Έ
Easy SpecialArrayWithXElementsGreaterThanOrEqualX β–Έ
Easy #1582 - Special Positions in a Binary Matrix Array, Matrix β–Έ
Easy #1221 - Split a String in Balanced Strings String, Greedy, Counting β–Έ
Easy #2788 - Split Strings by Separator Array, String β–Έ
Easy #3046 - Split the Array Array, Hash Table, Counting β–Έ
Easy SplitWithMinimumSum β–Έ
Easy #69 - Sqrt(x) Math, Binary Search β–Έ
Easy #977 - Squares of a Sorted Array Array, Two Pointers, Sorting β–Έ
Easy #3360 - Stone Removal Game Math, Simulation β–Έ
Easy #1408 - String Matching in an Array Array, String, String Matching β–Έ
Easy #2299 - Strong Password Checker II String β–Έ
Easy StudentAttendanceRecordI β–Έ
Easy #2913 - Subarrays Distinct Element Sum of Squares I Array, Hash Table β–Έ
Easy #3407 - Substring Matching Pattern String, String Matching β–Έ
Easy #1876 - Substrings of Size Three with Distinct Characters Hash Table, String, Sliding Window, Counting β–Έ
Easy #1281 - Subtract the Product and Sum of Digits of an Integer Math β–Έ
Easy SubtreeOfAnotherTree β–Έ
Easy #2652 - Sum Multiples Math β–Έ
Easy #1588 - Sum of All Odd Length Subarrays Array, Math, Prefix Sum β–Έ
Easy #1863 - Sum of All Subset XOR Totals Array, Math, Backtracking, Bit Manipulation, Combinatorics, Enumeration β–Έ
Easy #1837 - Sum of Digits in Base K Math β–Έ
Easy #1945 - Sum of Digits of String After Convert String, Simulation β–Έ
Easy #3712 - Sum of Elements With Frequency Divisible by K Array, Hash Table, Counting β–Έ
Easy #3452 - Sum of Good Numbers Array β–Έ
Easy SumOfLeftLeaves β–Έ
Easy #1022 - Sum of Root To Leaf Binary Numbers Tree, Depth-First Search, Binary Tree β–Έ
Easy #2778 - Sum of Squares of Special Elements Array, Enumeration β–Έ
Easy #1748 - Sum of Unique Elements Array, Hash Table, Counting β–Έ
Easy #2859 - Sum of Values at Indices With K Set Bits Array, Bit Manipulation β–Έ
Easy SumOfVariableLengthSubarrays β–Έ
Easy SummaryRanges β–Έ
Easy SurfaceAreaOf3dShapes β–Έ
Easy #101 - Symmetric Tree Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Easy #2558 - Take Gifts From the Richest Pile Array, Heap (Priority Queue), Simulation β–Έ
Easy TeemoAttacking β–Έ
Easy #2432 - The Employee That Worked on the Longest Task Array β–Έ
Easy #1337 - The K Weakest Rows in a Matrix Array, Binary Search, Sorting, Heap (Priority Queue), Matrix β–Έ
Easy #3289 - The Two Sneaky Numbers of Digitville Array, Hash Table, Math β–Έ
Easy ThirdMaximumNumber β–Έ
Easy #1556 - Thousand Separator String β–Έ
Easy #1550 - Three Consecutive Odds Array β–Έ
Easy #1952 - Three Divisors Math, Enumeration, Number Theory β–Έ
Easy #2073 - Time Needed to Buy Tickets Array, Queue, Simulation β–Έ
Easy TimeoutCancellation β–Έ
Easy ToBeOrNotToBe β–Έ
Easy ToLowerCase β–Έ
Easy ToeplitzMatrix β–Έ
Easy ToggleLightBulbs β–Έ
Easy TotalDistanceTraveled β–Έ
Easy #3467 - Transform Array by Parity Array, Sorting, Counting β–Έ
Easy #3379 - Transformed Array Array, Simulation β–Έ
Easy #867 - Transpose Matrix Array, Matrix, Simulation β–Έ
Easy #3856 - Trim Trailing Vowels General β–Έ
Easy TrionicArrayI β–Έ
Easy #1816 - Truncate Sentence Array, String β–Έ
Easy #2078 - Two Furthest Houses With Different Colors Array, Greedy β–Έ
Easy #2032 - Two Out of Three Array, Hash Table, Bit Manipulation β–Έ
Easy #1 - Two Sum Array, Hash Table β–Έ
Easy TwoSumIvInputIsABst β–Έ
Easy #3024 - Type of Triangle Array, Math, Sorting β–Έ
Easy UglyNumber β–Έ
Easy #884 - Uncommon Words from Two Sentences Hash Table, String, Counting β–Έ
Easy #3483 - Unique3DigitEvenNumbers Array, Enumeration β–Έ
Easy #929 - Unique Email Addresses Array, Hash Table, String β–Έ
Easy UniqueMorseCodeWords Array, HashSet, String β–Έ
Easy #1207 - Unique Number of Occurrences Array, Hash Table β–Έ
Easy #965 - Univalued Binary Tree Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Easy #242 - Valid Anagram Hash Table, String, Sorting β–Έ
Easy ValidBoomerang β–Έ
Easy #941 - Valid Mountain Array Array β–Έ
Easy #125 - Valid Palindrome Two Pointers, String β–Έ
Easy ValidPalindromeIi β–Έ
Easy #20 - Valid Parentheses String, Stack β–Έ
Easy #367 - Valid Perfect Square Math, Binary Search β–Έ
Easy ValidWord β–Έ
Easy #953 - Verifying an Alien Dictionary Array, Hash Table, String β–Έ
Easy VowelConsonantScore β–Έ
Easy #1518 - Water Bottles Math, Simulation β–Έ
Easy #3838 - Weighted Word Mapping Array, String, Simulation β–Έ
Easy WidestVerticalAreaBetweenTwoPointsContainingNoPoints β–Έ
Easy #290 - Word Pattern Hash Table, String β–Έ
Easy #914 - X of a Kind in a Deck of Cards Array, Hash Table, Math, Counting, Number Theory β–Έ
Easy #1486 - XOR Operation in an Array Math, Bit Manipulation β–Έ
Easy ZigzagGridTraversalWithSkip β–Έ
Medium AccountsMerge β–Έ
Medium #1936 - Add Minimum Number of Rungs Array, Greedy β–Έ
Medium AddOneRowToTree β–Έ
Medium #2 - Add Two Numbers Linked List, Math, Recursion β–Έ
Medium AddTwoNumbersIi β–Έ
Medium #2109 - Adding Spaces to a String Array, Two Pointers, String, Simulation β–Έ
Medium #1073 - Adding Two Negabinary Numbers Array, Math β–Έ
Medium #306 - Additive Number String, Backtracking β–Έ
Medium #3350 - Adjacent Increasing Subarrays Detection II Array, Binary Search β–Έ
Medium #870 - Advantage Shuffle Array, Two Pointers, Greedy, Sorting β–Έ
Medium #1227 - Airplane Seat Assignment Probability Math, Dynamic Programming, Brainteaser, Probability and Statistics β–Έ
Medium #1604 - Alert Using Same Key-Card Three or More Times in a One Hour Period Array, Hash Table, String, Sorting β–Έ
Medium #3021 - Alice and Bob Playing Flower Game Math β–Έ
Medium #2192 - All Ancestors of a Node in a Directed Acyclic Graph Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort β–Έ
Medium #2155 - All Divisions With the Highest Score of a Binary Array Array β–Έ
Medium #1305 - All Elements in Two Binary Search Trees Tree, Depth-First Search, Binary Search Tree, Sorting, Binary Tree β–Έ
Medium #863 - All Nodes Distance K in Binary Tree Hash Table, Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Medium AllPathsFromSourceToTarget β–Έ
Medium #894 - All Possible Full Binary Trees Dynamic Programming, Tree, Recursion, Memoization, Binary Tree β–Έ
Medium #1138 - Alphabet Board Path Hash Table, String β–Έ
Medium #3208 - Alternating Groups II Array, Sliding Window β–Έ
Medium #816 - Ambiguous Coordinates String, Backtracking, Enumeration β–Έ
Medium #2385 - Amount of Time for Binary Tree to Be Infected Hash Table, Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Medium #3497 - Analyze Subscription Conversion Database β–Έ
Medium #1344 - Angle Between Hands of a Clock Math β–Έ
Medium #2486 - Append Characters to String to Make Subsequence Two Pointers, String, Greedy β–Έ
Medium #2195 - Append K Integers With Minimal Sum Array, Math, Greedy, Sorting β–Έ
Medium #2546 - Apply Bitwise Operations to Make Strings Equal String, Bit Manipulation β–Έ
Medium #1357 - Apply Discount Every n Orders Array, Hash Table, Design β–Έ
Medium #2288 - Apply Discount to Prices String β–Έ
Medium #2772 - Apply Operations to Make All Array Elements Equal to Zero Array, Prefix Sum β–Έ
Medium #3039 - Apply Operations to Make String Empty Array, Hash Table, Sorting, Counting β–Έ
Medium #3091 - Apply Operations to Make Sum of Array Greater Than or Equal to k Math, Greedy, Enumeration β–Έ
Medium #2896 - Apply Operations to Make Two Strings Equal String, Dynamic Programming β–Έ
Medium ArithmeticSlices β–Έ
Medium #1630 - Arithmetic Subarrays Array, Hash Table, Sorting β–Έ
Medium ArrayNesting β–Έ
Medium #954 - Array of Doubled Pairs Array, Hash Table, Greedy, Sorting β–Έ
Medium #1968 - Array With Elements Not Equal to Average of Neighbors Array, Greedy, Sorting β–Έ
Medium #1162 - As Far from Land as Possible Array, Dynamic Programming, Breadth-First Search, Matrix β–Έ
Medium #3447 - Assign Elements to Groups with Constraints Array, Hash Table β–Έ
Medium AsteroidCollision β–Έ
Medium #1701 - Average Waiting Time Array, Simulation β–Έ
Medium #1488 - Avoid Flood in The City Array, Hash Table, Binary Search, Greedy, Heap (Priority Queue) β–Έ
Medium #948 - Bag of Tokens Array, Two Pointers, Greedy, Sorting β–Έ
Medium #1382 - Balance a Binary Search Tree Divide and Conquer, Greedy, Tree, Depth-First Search, Binary Search Tree, Binary Tree β–Έ
Medium #3669 - Balanced K-Factor Decomposition Math, Backtracking, Number Theory β–Έ
Medium #227 - Basic Calculator II Math, String, Stack β–Έ
Medium BattleshipsInABoard β–Έ
Medium BeautifulArrangement β–Έ
Medium BeautifulArrangementIi β–Έ
Medium #932 - Beautiful Array Array, Math, Divide and Conquer β–Έ
Medium #2865 - Beautiful Towers I Array, Stack, Monotonic Stack β–Έ
Medium #2866 - Beautiful Towers II Array, Stack, Monotonic Stack β–Έ
Medium #3809 - Best Reachable Tower Array β–Έ
Medium #1014 - Best Sightseeing Pair Array, Dynamic Programming β–Έ
Medium #1626 - Best Team With No Conflicts Array, Dynamic Programming, Sorting β–Έ
Medium #122 - Best Time to Buy and Sell Stock II Array, Dynamic Programming, Greedy β–Έ
Medium #3652 - Best Time to Buy and Sell Stock using Strategy Array, Sliding Window, Prefix Sum β–Έ
Medium #3573 - Best Time to Buy and Sell Stock V Array, Dynamic Programming β–Έ
Medium #309 - Best Time to Buy and Sell Stock with Cooldown Array, Dynamic Programming β–Έ
Medium BestTimeToBuyAndSellStockWithTransactionFee β–Έ
Medium #173 - Binary Search Tree Iterator Stack, Tree, Design, Binary Search Tree, Binary Tree, Iterator β–Έ
Medium #1038 - Binary Search Tree to Greater Sum Tree Tree, Depth-First Search, Binary Search Tree, Binary Tree β–Έ
Medium #1016 - Binary String With Substrings Representing 1 To N Hash Table, String, Bit Manipulation, Sliding Window β–Έ
Medium #930 - Binary Subarrays With Sum Array, Hash Table, Sliding Window, Prefix Sum β–Έ
Medium #1145 - Binary Tree Coloring Game Tree, Depth-First Search, Binary Tree β–Έ
Medium #102 - Binary Tree Level Order Traversal Tree, Breadth-First Search, Binary Tree β–Έ
Medium #107 - Binary Tree Level Order Traversal II Tree, Breadth-First Search, Binary Tree β–Έ
Medium #814 - Binary Tree Pruning Tree, Depth-First Search, Binary Tree β–Έ
Medium #199 - Binary Tree Right Side View Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Medium #103 - Binary Tree Zigzag Level Order Traversal Tree, Breadth-First Search, Binary Tree β–Έ
Medium #823 - Binary Trees With Factors Array, Hash Table, Dynamic Programming, Sorting β–Έ
Medium #201 - Bitwise AND of Numbers Range Bit Manipulation β–Έ
Medium #898 - Bitwise ORs of Subarrays Array, Dynamic Programming, Bit Manipulation β–Έ
Medium #2425 - Bitwise XOR of All Pairings Array, Bit Manipulation, Brainteaser β–Έ
Medium #881 - Boats to Save People Array, Two Pointers, Greedy, Sorting β–Έ
Medium #1328 - Break a Palindrome String, Greedy β–Έ
Medium BrickWall β–Έ
Medium #991 - Broken Calculator Math, Greedy β–Έ
Medium #1441 - Build an Array With Stack Operations Array, Stack, Simulation β–Έ
Medium #1117 - Building H2O Concurrency β–Έ
Medium #319 - Bulb Switcher Math, Brainteaser β–Έ
Medium BulbSwitcherIi β–Έ
Medium #299 - Bulls and Cows Hash Table, String, Counting β–Έ
Medium #2622 - Cache With Time Limit General β–Έ
Medium #3522 - Calculate Score After Performing Instructions Array, Hash Table, String, Simulation β–Έ
Medium #2693 - Call Function with Custom Context General β–Έ
Medium #1023 - Camelcase Matching Array, Two Pointers, String, Trie, String Matching β–Έ
Medium #1540 - Can Convert String in K Moves Hash Table, String β–Έ
Medium CanIWin β–Έ
Medium #1177 - Can Make Palindrome from Substring Array, Hash Table, String, Bit Manipulation, Prefix Sum β–Έ
Medium #1744 - Can You Eat Your Favorite Candy on Your Favorite Day? Array, Prefix Sum β–Έ
Medium #1011 - Capacity To Ship Packages Within D Days Array, Binary Search β–Έ
Medium #1393 - Capital Gain/Loss Database β–Έ
Medium #853 - Car Fleet Array, Stack, Sorting, Monotonic Stack β–Έ
Medium #1094 - Car Pooling Array, Sorting, Heap (Priority Queue), Simulation, Prefix Sum β–Έ
Medium #822 - Card Flipping Game Array, Hash Table β–Έ
Medium ChampagneTower β–Έ
Medium #1737 - Change Minimum Characters to Satisfy One of Three Conditions Hash Table, String, Counting, Prefix Sum β–Έ
Medium CheapestFlightsWithinKStops β–Έ
Medium #958 - Check Completeness of a Binary Tree Tree, Breadth-First Search, Binary Tree β–Έ
Medium #3848 - Check Digitorial Permutation Math, Counting β–Έ
Medium #2116 - Check if a Parentheses String Can Be Valid String, Stack, Greedy β–Έ
Medium #1433 - Check If a String Can Break Another String String, Greedy, Sorting β–Έ
Medium #1461 - Check If a String Contains All Binary Codes of Size K Hash Table, String, Bit Manipulation, Rolling Hash, Hash Function β–Έ
Medium #1497 - Check If Array Pairs Are Divisible by k Array, Hash Table, Counting β–Έ
Medium #3394 - Check if Grid can be Cut into Sections Array, Sorting β–Έ
Medium #2811 - Check if it is Possible to Split Array Array, Dynamic Programming, Greedy β–Έ
Medium #1958 - Check if Move is Legal Array, Matrix, Enumeration β–Έ
Medium #1780 - Check if Number is a Sum of Powers of Three Math β–Έ
Medium #2618 - Check if Object Instance of Class General β–Έ
Medium #2840 - Check if Strings Can be Made Equal With Operations II Hash Table, String, Sorting β–Έ
Medium #2369 - Check if There is a Valid Partition For The Array Array, Dynamic Programming β–Έ
Medium #1391 - Check if There is a Valid Path in a Grid Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix β–Έ
Medium #2018 - Check if Word Can Be Placed In Crossword Array, Matrix, Enumeration β–Έ
Medium #1003 - Check If Word Is Valid After Substitutions String, Stack β–Έ
Medium #2596 - Check Knight Tour Configuration Array, Depth-First Search, Breadth-First Search, Matrix, Simulation β–Έ
Medium #3478 - Choose K Elements With Maximum Sum Array, Sorting, Heap (Priority Queue) β–Έ
Medium #1386 - Cinema Seat Allocation Array, Hash Table, Greedy, Bit Manipulation β–Έ
Medium #1401 - Circle and Rectangle Overlapping Math, Geometry β–Έ
Medium CircularArrayLoop β–Έ
Medium #1238 - Circular Permutation in Binary Representation Math, Backtracking, Bit Manipulation β–Έ
Medium #3693 - Climbing Stairs II Array, Dynamic Programming β–Έ
Medium #133 - Clone Graph Hash Table, Depth-First Search, Breadth-First Search, Graph Theory β–Έ
Medium #1774 - Closest Dessert Cost Array, Dynamic Programming, Backtracking β–Έ
Medium #1362 - Closest Divisors Math β–Έ
Medium #3488 - Closest Equal Element Queries Array, Hash Table, Binary Search β–Έ
Medium #2476 - Closest Nodes Queries in a Binary Search Tree Array, Binary Search, Tree, Depth-First Search, Binary Search Tree, Binary Tree β–Έ
Medium #2523 - Closest Prime Numbers in Range Math, Number Theory β–Έ
Medium #1006 - Clumsy Factorial Math, Stack, Simulation β–Έ
Medium #322 - Coin Change Array, Dynamic Programming, Breadth-First Search β–Έ
Medium CoinChangeIi β–Έ
Medium #2735 - Collecting Chocolates Array, Enumeration β–Έ
Medium #1034 - Coloring A Border Array, Depth-First Search, Breadth-First Search, Matrix β–Έ
Medium #39 - Combination Sum Array, Backtracking β–Έ
Medium #40 - Combination Sum II Array, Backtracking β–Έ
Medium #216 - Combination Sum III Array, Backtracking β–Έ
Medium #377 - Combination Sum IV Array, Dynamic Programming β–Έ
Medium #77 - Combinations Backtracking β–Έ
Medium #2705 - Compact Object General β–Έ
Medium #1170 - Compare Strings by Frequency of the Smallest Character Array, Hash Table, String, Binary Search, Sorting β–Έ
Medium #165 - Compare Version Numbers Two Pointers, String β–Έ
Medium #919 - Complete Binary Tree Inserter Tree, Breadth-First Search, Design, Binary Tree β–Έ
Medium #3765 - Complete Prime Number Math, Enumeration, Number Theory β–Έ
Medium ComplexNumberMultiplication β–Έ
Medium #3756 - Concatenate Non-Zero Digits and Multiply by Sum II Math, String, Prefix Sum β–Έ
Medium #1680 - Concatenation of Consecutive Binary Numbers Math, Bit Manipulation, Simulation β–Έ
Medium #1934 - Confirmation Rate Database β–Έ
Medium #1008 - Construct Binary Search Tree from Preorder Traversal Array, Stack, Tree, Binary Search Tree, Monotonic Stack, Binary Tree β–Έ
Medium #106 - Construct Binary Tree from Inorder and Postorder Traversal Array, Hash Table, Divide and Conquer, Tree, Binary Tree β–Έ
Medium #105 - Construct Binary Tree from Preorder and Inorder Traversal Array, Hash Table, Divide and Conquer, Tree, Binary Tree β–Έ
Medium #889 - Construct Binary Tree from Preorder and Postorder Traversal Array, Hash Table, Divide and Conquer, Tree, Binary Tree β–Έ
Medium #1400 - Construct K Palindrome Strings Hash Table, String, Greedy, Counting β–Έ
Medium #2906 - Construct Product Matrix Array, Matrix, Prefix Sum β–Έ
Medium ConstructQuadTree β–Έ
Medium #2375 - Construct Smallest Number From DI String String, Backtracking, Stack, Greedy β–Έ
Medium ConstructStringFromBinaryTree β–Έ
Medium #2182 - Construct String With Repeat Limit Hash Table, String, Greedy, Heap (Priority Queue), Counting β–Έ
Medium #1718 - Construct the Lexicographically Largest Valid Sequence Array, Backtracking β–Έ
Medium #2745 - Construct the Longest New String Math, Dynamic Programming, Greedy, Brainteaser β–Έ
Medium #3315 - Construct the Minimum Bitwise Array II Array, Bit Manipulation β–Έ
Medium #11 - Container With Most Water Array, Two Pointers, Greedy β–Έ
Medium ContiguousArray β–Έ
Medium ContinuousSubarraySum β–Έ
Medium #2762 - Continuous Subarrays Array, Queue, Sliding Window, Heap (Priority Queue), Ordered Set, Monotonic Queue β–Έ
Medium #2610 - Convert an Array Into a 2D Array With Conditions Array, Hash Table β–Έ
Medium ConvertBstToGreaterTree β–Έ
Medium #109 - Convert Sorted List to Binary Search Tree Linked List, Divide and Conquer, Tree, Binary Search Tree, Binary Tree β–Έ
Medium #1017 - Convert to Base -2 Math β–Έ
Medium #1620 - Coordinate With Maximum Network Quality Array, Enumeration β–Έ
Medium #138 - Copy List with Random Pointer Hash Table, Linked List β–Έ
Medium #1109 - Corporate Flight Bookings Array, Prefix Sum β–Έ
Medium #3265 - Count Almost Equal Pairs I Array, Hash Table, Sorting, Counting, Enumeration β–Έ
Medium #3101 - Count Alternating Subarrays Array, Math β–Έ
Medium #38 - Count and Say String β–Έ
Medium #2201 - Count Artifacts That Can Be Extracted Array, Hash Table, Simulation β–Έ
Medium #3388 - Count Beautiful Splits in an Array Array, Dynamic Programming β–Έ
Medium #2947 - Count Beautiful Substrings I Hash Table, Math, String, Enumeration, Number Theory, Prefix Sum β–Έ
Medium #3676 - Count Bowl Subarrays Array, Stack, Monotonic Stack β–Έ
Medium #3805 - Count Caesar Cipher Pairs Array, Hash Table, Math, String, Counting β–Έ
Medium #3529 - Count Cells in Overlapping Horizontal and Vertical Substrings Array, String, Rolling Hash, String Matching, Matrix, Hash Function β–Έ
Medium #2550 - Count Collisions of Monkeys on a Polygon Math, Recursion β–Έ
Medium #2211 - Count Collisions on a Road String, Stack, Simulation β–Έ
Medium #2799 - Count Complete Subarrays in an Array Array, Hash Table, Sliding Window β–Έ
Medium #3531 - Count Covered Buildings Array, Hash Table, Sorting β–Έ
Medium #3169 - Count Days Without Meetings Array, Sorting β–Έ
Medium #3747 - Count Distinct Integers After Removing Zeros Math, Dynamic Programming β–Έ
Medium #3759 - Count Elements With at Least K Greater Values Array, Binary Search, Divide and Conquer, Sorting, Quickselect β–Έ
Medium #1711 - Count Good Meals Array, Hash Table β–Έ
Medium #1448 - Count Good Nodes in Binary Tree Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Medium #1922 - Count Good Numbers Math, Recursion β–Έ
Medium #3619 - Count Islands With Total Value Divisible by K Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix β–Έ
Medium #2249 - Count Lattice Points Inside a Circle Array, Hash Table, Math, Geometry, Enumeration β–Έ
Medium #3433 - Count Mentions Per User Array, Math, Sorting, Simulation β–Έ
Medium #1814 - Count Nice Pairs in an Array Array, Hash Table, Math, Counting β–Έ
Medium #2265 - Count Nodes Equal to Average of Subtree Tree, Depth-First Search, Binary Tree β–Έ
Medium #2049 - Count Nodes With the Highest Score Array, Tree, Depth-First Search, Binary Tree β–Έ
Medium #2364 - Count Number of Bad Pairs Array, Hash Table, Math, Counting β–Έ
Medium #2442 - Count Number of Distinct Integers After Reverse Operations Array, Hash Table, Math, Counting β–Έ
Medium #1759 - Count Number of Homogenous Substrings Math, String β–Έ
Medium #2044 - Count Number of Maximum Bitwise-OR Subsets Array, Backtracking, Bit Manipulation, Enumeration β–Έ
Medium #1248 - Count Number of Nice Subarrays Array, Hash Table, Math, Sliding Window, Prefix Sum β–Έ
Medium #2250 - Count Number of Rectangles Containing Each Point Array, Hash Table, Binary Search, Binary Indexed Tree, Sorting β–Έ
Medium #1395 - Count Number of Teams Array, Dynamic Programming, Binary Indexed Tree, Segment Tree β–Έ
Medium #2266 - Count Number of Texts Hash Table, Math, String, Dynamic Programming β–Έ
Medium #3623 - Count Number of Trapezoids I Array, Hash Table, Math, Geometry β–Έ
Medium #2320 - Count Number of Ways to Place Houses Dynamic Programming β–Έ
Medium #357 - Count Numbers with Unique Digits Math, Dynamic Programming, Backtracking β–Έ
Medium #2845 - Count of Interesting Subarrays Array, Hash Table, Prefix Sum β–Έ
Medium #3305 - Count of Substrings Containing Every Vowel and K Consonants I Hash Table, String, Sliding Window β–Έ
Medium #3306 - Count of Substrings Containing Every Vowel and K Consonants II Hash Table, String, Sliding Window β–Έ
Medium #3067 - Count Pairs of Connectable Servers in a Weighted Tree Network Array, Tree, Depth-First Search β–Έ
Medium #2857 - Count Pairs of Points With Distance k Array, Hash Table, Bit Manipulation β–Έ
Medium #3185 - Count Pairs That Form a Complete Day II Array, Hash Table, Counting β–Έ
Medium #3578 - Count Partitions With Max-Min Difference at Most K Array, Dynamic Programming, Queue, Sliding Window, Prefix Sum, Monotonic Queue β–Έ
Medium #3393 - Count Paths With the Given XOR Value Array, Dynamic Programming, Bit Manipulation, Matrix β–Έ
Medium #3589 - Count Prime-Gap Balanced Subarrays Array, Math, Queue, Sliding Window, Number Theory, Monotonic Queue β–Έ
Medium #204 - Count Primes Array, Math, Enumeration, Number Theory β–Έ
Medium #1907 - Count Salary Categories Database β–Έ
Medium #1267 - Count Servers that Communicate Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix, Counting β–Έ
Medium #1641 - Count Sorted Vowel Strings Math, Dynamic Programming, Combinatorics β–Έ
Medium #3404 - Count Special Subsequences Array, Hash Table, Math, Enumeration β–Έ
Medium #3583 - Count Special Triplets Array, Hash Table, Counting β–Έ
Medium #1277 - Count Square Submatrices with All Ones Array, Dynamic Programming, Matrix β–Έ
Medium #1905 - Count Sub Islands Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix β–Έ
Medium #2962 - Count Subarrays Where Max Element Appears at Least K Times Array, Sliding Window β–Έ
Medium #3835 - Count Subarrays With Cost Less Than or Equal to K Array, Queue, Monotonic Queue β–Έ
Medium #3737 - Count Subarrays With Majority Element I Array, Hash Table, Divide and Conquer, Segment Tree, Merge Sort, Counting, Prefix Sum β–Έ
Medium #1504 - Count Submatrices With All Ones Array, Dynamic Programming, Stack, Matrix, Monotonic Stack β–Έ
Medium #3212 - Count Submatrices With Equal Frequency of X and Y Array, Matrix, Prefix Sum β–Έ
Medium #3070 - Count Submatrices with Top-Left Element and Sum Less Than k Array, Matrix, Prefix Sum β–Έ
Medium #3084 - Count Substrings Starting and Ending with Given Character Math, String, Counting β–Έ
Medium #3297 - Count Substrings That Can Be Rearranged to Contain a String I Hash Table, String, Sliding Window β–Έ
Medium #1638 - Count Substrings That Differ by One Character Hash Table, String, Dynamic Programming, Enumeration β–Έ
Medium #3325 - Count Substrings With K-Frequency Characters I Hash Table, String, Sliding Window β–Έ
Medium #2145 - Count the Hidden Sequences Array, Prefix Sum β–Έ
Medium #2588 - Count the Number of Beautiful Subarrays Array, Hash Table, Bit Manipulation, Prefix Sum β–Έ
Medium #2685 - Count the Number of Complete Components Depth-First Search, Breadth-First Search, Union-Find, Graph Theory β–Έ
Medium #3577 - Count the Number of Computer Unlocking Permutations Array, Math, Brainteaser, Combinatorics β–Έ
Medium #2563 - Count the Number of Fair Pairs Array, Two Pointers, Binary Search, Sorting β–Έ
Medium #3249 - Count the Number of Good Nodes Tree, Depth-First Search β–Έ
Medium #2537 - Count the Number of Good Subarrays Array, Hash Table, Sliding Window β–Έ
Medium #3015 - Count the Number of Houses at a Certain Distance I Breadth-First Search, Graph Theory, Prefix Sum β–Έ
Medium #3121 - Count the Number of Special Characters II Hash Table, String β–Έ
Medium #2572 - Count the Number of Square-Free Subsets Array, Math, Dynamic Programming, Bit Manipulation, Bitmask β–Έ
Medium #3234 - Count the Number of Substrings With Dominant Ones String, Enumeration β–Έ
Medium #2579 - Count Total Number of Colored Cells Math β–Έ
Medium #1442 - Count Triplets That Can Form Two Arrays of Equal XOR Array, Hash Table, Math, Bit Manipulation, Prefix Sum β–Έ
Medium #2257 - Count Unguarded Cells in the Grid Array, Matrix, Simulation β–Έ
Medium #1583 - Count Unhappy Friends Array, Simulation β–Έ
Medium #2316 - Count Unreachable Pairs of Nodes in an Undirected Graph Depth-First Search, Breadth-First Search, Union-Find, Graph Theory β–Έ
Medium #2559 - Count Vowel Strings in Ranges Array, String, Prefix Sum β–Έ
Medium #2466 - Count Ways To Build Good Strings Dynamic Programming β–Έ
Medium #2580 - Count Ways to Group Overlapping Ranges Array, Sorting β–Έ
Medium #2135 - Count Words Obtained After Adding a Letter Array, Hash Table, String, Bit Manipulation, Sorting β–Έ
Medium #2747 - Count Zero Request Servers Array, Hash Table, Sliding Window, Sorting β–Έ
Medium #207 - Course Schedule Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort β–Έ
Medium #210 - Course Schedule II Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort β–Έ
Medium #1462 - Course Schedule IV Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort β–Έ
Medium #2641 - Cousins in Binary Tree II Hash Table, Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Medium #2196 - Create Binary Tree From Descriptions Array, Hash Table, Tree, Binary Tree β–Έ
Medium CustomSortString β–Έ
Medium #1045 - Customers Who Bought All Products Database β–Έ
Medium #1914 - Cyclically Rotating a Grid Array, Matrix, Simulation β–Έ
Medium DailyTemperatures β–Έ
Medium #2627 - Debounce General β–Έ
Medium #394 - Decode String String, Stack, Recursion β–Έ
Medium #2075 - Decode the Slanted Ciphertext String, Simulation β–Έ
Medium #91 - Decode Ways String, Dynamic Programming β–Έ
Medium #1734 - Decode XORed Permutation Array, Bit Manipulation β–Έ
Medium #880 - Decoded String at Index String, Stack β–Έ
Medium #1144 - Decrease Elements To Make Array Zigzag Array, Greedy β–Έ
Medium #2746 - Decremental String Concatenation Array, String, Dynamic Programming β–Έ
Medium #1302 - Deepest Leaves Sum Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Medium DeleteAndEarn β–Έ
Medium #955 - Delete Columns to Make Sorted II Array, String, Greedy β–Έ
Medium #1325 - Delete Leaves With a Given Value Tree, Depth-First Search, Binary Tree β–Έ
Medium DeleteNodeInABst β–Έ
Medium #237 - Delete Node in a Linked List Linked List β–Έ
Medium #1110 - Delete Nodes And Return Forest Array, Hash Table, Tree, Depth-First Search, Binary Tree β–Έ
Medium #3217 - Delete Nodes From Linked List Present in Array Array, Hash Table, Linked List β–Έ
Medium DeleteOperationForTwoStrings β–Έ
Medium #2095 - Delete the Middle Node of a Linked List Linked List, Two Pointers β–Έ
Medium #1943 - Describe the Painting Array, Hash Table, Sorting, Prefix Sum β–Έ
Medium #2353 - Design a Food Rating System Array, Hash Table, String, Design, Heap (Priority Queue), Ordered Set β–Έ
Medium #2349 - Design a Number Container System Hash Table, Design, Heap (Priority Queue), Ordered Set β–Έ
Medium #1381 - Design a Stack With Increment Operation Array, Stack, Design β–Έ
Medium #211 - Design Add and Search Words Data Structure String, Depth-First Search, Design, Trie β–Έ
Medium #2241 - Design an ATM Machine Array, Greedy, Design β–Έ
Medium #3815 - Design Auction System Hash Table, Design, Heap (Priority Queue), Ordered Set β–Έ
Medium #1797 - Design Authentication Manager Hash Table, Linked List, Design, Doubly-Linked List β–Έ
Medium #2166 - Design Bitset Array, Hash Table, String, Design β–Έ
Medium #1472 - Design Browser History Array, Linked List, Stack, Design, Doubly-Linked List, Data Stream β–Έ
Medium DesignCircularDeque β–Έ
Medium DesignCircularQueue β–Έ
Medium #3709 - Design Exam Scores Tracker Array, Binary Search, Design, Prefix Sum β–Έ
Medium #1670 - Design Front Middle Back Queue Array, Linked List, Design, Queue, Doubly-Linked List, Data Stream β–Έ
Medium DesignLinkedList β–Έ
Medium #2502 - Design Memory Allocator Array, Hash Table, Design, Simulation β–Έ
Medium #3829 - Design Ride Sharing System Hash Table, Design, Queue, Data Stream β–Έ
Medium #3484 - Design Spreadsheet Array, Hash Table, String, Design, Matrix β–Έ
Medium #3408 - Design Task Manager Hash Table, Design, Heap (Priority Queue), Ordered Set β–Έ
Medium #355 - Design Twitter Hash Table, Linked List, Design, Heap (Priority Queue) β–Έ
Medium #1396 - Design Underground System Hash Table, String, Design β–Έ
Medium #2453 - Destroy Sequential Targets Array, Hash Table, Counting β–Έ
Medium #2126 - Destroying Asteroids Array, Greedy, Sorting β–Έ
Medium #1559 - Detect Cycles in 2D Grid Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix β–Έ
Medium #2013 - Detect Squares Array, Hash Table, Design, Counting, Data Stream β–Έ
Medium #2849 - Determine if a Cell Is Reachable at a Given Time Math β–Έ
Medium #1657 - Determine if Two Strings Are Close Hash Table, String, Sorting, Counting β–Έ
Medium #2829 - Determine the Minimum Sum of a k-avoiding Array Math, Greedy β–Έ
Medium #2101 - Detonate the Maximum Bombs Array, Math, Depth-First Search, Breadth-First Search, Graph Theory, Geometry β–Έ
Medium DiagonalTraverse β–Έ
Medium #1424 - Diagonal Traverse II Array, Sorting, Heap (Priority Queue) β–Έ
Medium #2482 - Difference Between Ones and Zeros in Row and Column Array, Matrix, Simulation β–Έ
Medium #2711 - Difference of Number of Distinct Values on Diagonals Array, Hash Table, Matrix β–Έ
Medium #241 - Different Ways to Add Parentheses Math, String, Dynamic Programming, Recursion, Memoization β–Έ
Medium #3377 - Digit Operations to Make Two Integers Equal Math, Graph Theory, Heap (Priority Queue), Number Theory, Shortest Path β–Έ
Medium #2556 - Disconnect Path in a Binary Matrix by at Most One Flip Array, Dynamic Programming, Depth-First Search, Breadth-First Search, Matrix β–Έ
Medium #1418 - Display Table of Food Orders in a Restaurant Array, Hash Table, String, Sorting, Ordered Set β–Έ
Medium #1054 - Distant Barcodes Array, Hash Table, Greedy, Sorting, Heap (Priority Queue), Counting β–Έ
Medium #3694 - Distinct Points Reachable After Substring Removal Hash Table, String, Sliding Window, Prefix Sum β–Έ
Medium #2521 - Distinct Prime Factors of Product of Array Array, Hash Table, Math, Number Theory β–Έ
Medium #2929 - Distribute Candies Among Children II Math, Combinatorics, Enumeration β–Έ
Medium #979 - Distribute Coins in Binary Tree Tree, Depth-First Search, Binary Tree β–Έ
Medium #1296 - Divide Array in Sets of K Consecutive Numbers Array, Hash Table, Greedy, Sorting β–Έ
Medium #2966 - Divide Array Into Arrays With Max Difference Array, Greedy, Sorting β–Έ
Medium #2406 - Divide Intervals Into Minimum Number of Groups Array, Two Pointers, Greedy, Sorting, Heap (Priority Queue), Prefix Sum β–Έ
Medium #2491 - Divide Players Into Teams of Equal Skill Array, Hash Table, Two Pointers, Sorting β–Έ
Medium #29 - Divide Two Integers Math, Bit Manipulation β–Έ
Medium #3475 - DNA Pattern Recognition Database β–Έ
Medium DominoAndTrominoTiling β–Έ
Medium Dota2Senate β–Έ
Medium #2816 - Double a Number Represented as a Linked List Linked List, Math, Stack β–Έ
Medium #2961 - Double Modular Exponentiation Array, Math, Simulation β–Έ
Medium #3635 - Earliest Finish Time for Land and Water Rides II Array, Two Pointers, Binary Search, Greedy, Sorting β–Έ
Medium #3048 - Earliest Second to Mark Indices I Array, Binary Search β–Έ
Medium #3457 - Eat Pizzas! Array, Greedy, Sorting β–Έ
Medium #72 - Edit Distance String, Dynamic Programming β–Έ
Medium #1884 - Egg Drop With 2 Eggs and N Floors Math, Dynamic Programming β–Έ
Medium #1921 - Eliminate Maximum Number of Monsters Array, Greedy, Sorting β–Έ
Medium #390 - Elimination Game Math, Recursion β–Έ
Medium EmployeeImportance β–Έ
Medium EncodeAndDecodeTinyurl β–Έ
Medium #2352 - Equal Row and Column Pairs Array, Hash Table, Matrix, Simulation β–Έ
Medium #1775 - Equal Sum Arrays With Minimum Number of Operations Array, Hash Table, Greedy, Counting β–Έ
Medium #3546 - Equal Sum Grid Partition I Array, Matrix, Enumeration, Prefix Sum β–Έ
Medium EscapeTheGhosts β–Έ
Medium #399 - Evaluate Division Array, String, Depth-First Search, Breadth-First Search, Union-Find, Graph Theory, Shortest Path β–Έ
Medium #150 - Evaluate Reverse Polish Notation Array, Math, Stack β–Έ
Medium #1807 - Evaluate the Bracket Pairs of a String Array, Hash Table, String β–Έ
Medium #1609 - Even Odd Tree Tree, Breadth-First Search, Binary Tree β–Έ
Medium #2694 - Event Emitter General β–Έ
Medium #855 - Exam Room Design, Heap (Priority Queue), Ordered Set β–Έ
Medium ExclusiveTimeOfFunctions β–Έ
Medium #2721 - Execute Asynchronous Functions in Parallel General β–Έ
Medium #2120 - Execution of All Suffix Instructions Staying in a Grid String, Simulation β–Έ
Medium #809 - Expressive Words Array, Two Pointers, String β–Έ
Medium #2707 - Extra Characters in a String Array, Hash Table, String, Dynamic Programming, Trie β–Έ
Medium #172 - Factorial Trailing Zeroes Math β–Έ
Medium #2305 - Fair Distribution of Cookies Array, Dynamic Programming, Backtracking, Bit Manipulation, Bitmask β–Έ
Medium #3537 - Fill a Special Grid Array, Divide and Conquer, Matrix β–Έ
Medium #1105 - Filling Bookcase Shelves Array, Dynamic Programming β–Έ
Medium #1333 - Filter Restaurants by Vegan-Friendly, Price and Distance Array, Sorting β–Έ
Medium #3828 - Final Element After Subarray Deletions Array, Math, Brainteaser, Game Theory β–Έ
Medium #1901 - Find a Peak Element II Array, Binary Search, Matrix β–Έ
Medium #3286 - Find a Safe Walk Through a Grid Array, Breadth-First Search, Graph Theory, Heap (Priority Queue), Matrix, Shortest Path β–Έ
Medium FindAllAnagramsInAString β–Έ
Medium FindAllDuplicatesInAnArray β–Έ
Medium #2420 - Find All Good Indices Array, Dynamic Programming, Prefix Sum β–Έ
Medium #1992 - Find All Groups of Farmland Array, Depth-First Search, Breadth-First Search, Matrix β–Έ
Medium #2150 - Find All Lonely Numbers in the Array Array, Hash Table, Counting β–Έ
Medium #2115 - Find All Possible Recipes from Given Supplies Array, Hash Table, String, Graph Theory, Topological Sort β–Έ
Medium #3129 - Find All Possible Stable Binary Arrays I Dynamic Programming, Prefix Sum β–Έ
Medium #833 - Find And Replace in String Array, Hash Table, String, Sorting β–Έ
Medium #890 - Find and Replace Pattern Array, Hash Table, String β–Έ
Medium #3006 - Find Beautiful Indices in the Given Array I Two Pointers, String, Binary Search, Rolling Hash, String Matching, Hash Function β–Έ
Medium #3642 - Find Books with Polarized Opinions General β–Έ
Medium FindBottomLeftTreeValue β–Έ
Medium #2924 - Find Champion II Graph Theory β–Έ
Medium #3716 - Find Churn Risk Customers General β–Έ
Medium #2359 - Find Closest Node to Given Two Nodes Depth-First Search, Graph Theory β–Έ
Medium #2526 - Find Consecutive Integers from a Data Stream Hash Table, Design, Queue, Counting, Data Stream β–Έ
Medium #3580 - Find Consistently Improving Employees Database β–Έ
Medium #3586 - Find COVID Recovery Patients Database β–Έ
Medium #3601 - Find Drivers with Improved Fuel Efficiency Database β–Έ
Medium FindDuplicateFileInSystem β–Έ
Medium FindDuplicateSubtrees β–Έ
Medium #1261 - Find Elements in a Contaminated Binary Tree Hash Table, Tree, Depth-First Search, Breadth-First Search, Design, Binary Tree β–Έ
Medium #3808 - Find Emotionally Consistent Users General β–Έ
Medium #802 - Find Eventual Safe States Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort β–Έ
Medium #34 - Find First and Last Position of Element in Sorted Array Array, Binary Search β–Έ
Medium #3705 - Find Golden Hour Customers General β–Έ
Medium #2100 - Find Good Days to Rob the Bank Array, Dynamic Programming, Prefix Sum β–Έ
Medium #3011 - Find if Array Can Be Sorted Array, Bit Manipulation, Sorting β–Έ
Medium #2905 - Find Indices With Index and Value Difference II Array, Two Pointers β–Έ
Medium FindKClosestElements β–Έ
Medium #373 - Find K Pairs with Smallest Sums Array, Heap (Priority Queue) β–Έ
Medium #1545 - Find Kth Bit in Nth Binary String String, Recursion, Simulation β–Έ
Medium #1738 - Find Kth Largest XOR Coordinate Value Array, Divide and Conquer, Bit Manipulation, Sorting, Heap (Priority Queue), Matrix, Prefix Sum, Quickselect β–Έ
Medium FindLargestValueInEachTreeRow β–Έ
Medium #1562 - Find Latest Group of Size M Array, Hash Table, Binary Search, Simulation β–Έ
Medium #2981 - Find Longest Special Substring That Occurs Thrice I Hash Table, String, Binary Search, Sliding Window, Counting β–Έ
Medium #2982 - Find Longest Special Substring That Occurs Thrice II Hash Table, String, Binary Search, Sliding Window, Counting β–Έ
Medium #3657 - Find Loyal Customers General β–Έ
Medium #3588 - Find Maximum Area of a Triangle Array, Hash Table, Math, Greedy, Geometry, Enumeration β–Έ
Medium #3755 - Find Maximum Balanced XOR Subarray Length Array, Hash Table, Bit Manipulation, Prefix Sum β–Έ
Medium #3557 - Find Maximum Number of Non Intersecting Substrings Hash Table, String, Dynamic Programming, Greedy β–Έ
Medium #3316 - Find Maximum Removals From Source String Array, Hash Table, Two Pointers, String, Dynamic Programming β–Έ
Medium #3796 - Find Maximum Value in a Constrained Sequence Array, Greedy β–Έ
Medium #3469 - Find Minimum Cost to Remove Array Elements Array, Dynamic Programming β–Έ
Medium #153 - Find Minimum in Rotated Sorted Array Array, Binary Search β–Έ
Medium #3341 - Find Minimum Time to Reach Last Room I Array, Graph Theory, Heap (Priority Queue), Matrix, Shortest Path β–Έ
Medium #3342 - Find Minimum Time to Reach Last Room II Array, Graph Theory, Heap (Priority Queue), Matrix, Shortest Path β–Έ
Medium #3412 - Find Mirror Score of a String Hash Table, String, Stack, Simulation β–Έ
Medium #2028 - Find Missing Observations Array, Math, Simulation β–Έ
Medium #3159 - Find Occurrences of an Element in an Array Array, Hash Table β–Έ
Medium #2007 - Find Original Array From Doubled Array Array, Hash Table, Greedy, Sorting β–Έ
Medium #3611 - Find Overbooked Employees Database β–Έ
Medium #2217 - Find Palindrome With Fixed Length Array, Math β–Έ
Medium #162 - Find Peak Element Array, Binary Search β–Έ
Medium #2225 - Find Players With Zero or One Losses Array, Hash Table, Sorting, Counting β–Έ
Medium #2971 - Find Polygon With the Largest Perimeter Array, Greedy, Sorting, Prefix Sum β–Έ
Medium #1237 - Find Positive Integer Solution for a Given Equation Math, Two Pointers, Binary Search, Interactive β–Έ
Medium #3521 - Find Product Recommendation Pairs Database β–Έ
Medium FindRightInterval β–Έ
Medium #2593 - Find Score of an Array After Marking All Elements Array, Hash Table, Sorting, Heap (Priority Queue), Simulation β–Έ
Medium #3626 - Find Stores with Inventory Imbalance General β–Έ
Medium #3421 - Find Students Who Improved Database β–Έ
Medium #3331 - Find Subtree Sizes After Changes Array, Hash Table, String, Tree, Depth-First Search β–Έ
Medium #1334 - Find the City With the Smallest Number of Neighbors at a Threshold Distance Dynamic Programming, Graph Theory, Shortest Path β–Έ
Medium #3233 - Find the Count of Numbers Which Are Not Special Array, Math, Number Theory β–Έ
Medium #2575 - Find the Divisibility Array of a String Array, Math, String β–Έ
Medium #287 - Find the Duplicate Number Array, Two Pointers, Binary Search, Bit Manipulation β–Έ
Medium #3175 - Find The First Player to win K Games in a Row Array, Simulation β–Έ
Medium #3030 - Find the Grid of Region Average Array, Matrix β–Έ
Medium #3132 - Find the Integer Added to Array II Array, Two Pointers, Sorting, Enumeration β–Έ
Medium #1985 - Find the Kth Largest Integer in the Array Array, String, Divide and Conquer, Sorting, Heap (Priority Queue), Quickselect β–Έ
Medium #3047 - Find the Largest Area of Square Inside Two Rectangles Array, Math, Geometry β–Έ
Medium #3043 - Find the Length of the Longest Common Prefix Array, Hash Table, String, Trie β–Έ
Medium #3403 - Find the Lexicographically Largest String From the Box I Two Pointers, String, Enumeration β–Έ
Medium #3302 - Find the Lexicographically Smallest Valid Sequence Two Pointers, String, Dynamic Programming, Greedy β–Έ
Medium #2831 - Find the Longest Equal Subarray Array, Hash Table, Binary Search, Sliding Window β–Έ
Medium #2730 - Find the Longest Semi-Repetitive Substring String, Sliding Window β–Έ
Medium #1371 - Find the Longest Substring Containing Vowels in Even Counts Hash Table, String, Bit Manipulation, Prefix Sum β–Έ
Medium #3334 - Find the Maximum Factor Score of Array Array, Math, Number Theory β–Έ
Medium #3176 - Find the Maximum Length of a Good Subsequence I Array, Hash Table, Dynamic Programming β–Έ
Medium #3201 - Find the Maximum Length of Valid Subsequence I Array, Dynamic Programming β–Έ
Medium #3202 - Find the Maximum Length of Valid Subsequence II Array, Dynamic Programming β–Έ
Medium #3020 - Find the Maximum Number of Elements in Subset Array, Hash Table, Enumeration β–Έ
Medium #2576 - Find the Maximum Number of Marked Indices Array, Two Pointers, Binary Search, Greedy, Sorting β–Έ
Medium #3494 - Find the Minimum Amount of Time to Brew Potions Array, Simulation, Prefix Sum β–Έ
Medium #2058 - Find the Minimum and Maximum Number of Nodes Between Critical Points Linked List β–Έ
Medium #3195 - Find the Minimum Area to Cover All Ones I Array, Matrix β–Έ
Medium #1414 - Find the Minimum Number of Fibonacci Numbers Whose Sum Is K Math, Greedy β–Έ
Medium #2834 - Find the Minimum Possible Sum of a Beautiful Array Math, Greedy β–Έ
Medium #3527 - Find the Most Common Response Array, Hash Table, String, Counting β–Έ
Medium #1673 - Find the Most Competitive Subsequence Array, Stack, Greedy, Monotonic Stack β–Έ
Medium #3179 - Find the N-th Value After K Seconds Array, Math, Simulation, Combinatorics, Prefix Sum β–Έ
Medium #3468 - Find the Number of Copy Arrays Array, Math β–Έ
Medium #3160 - Find the Number of Distinct Colors Among the Balls Array, Hash Table, Simulation β–Έ
Medium #3164 - Find the Number of Good Pairs II Array, Hash Table β–Έ
Medium #3025 - Find the Number of Ways to Place People I Array, Math, Geometry, Sorting, Enumeration β–Έ
Medium #2433 - Find The Original Array of Prefix Xor Array, Bit Manipulation β–Έ
Medium #3254 - Find the Power of K-Size Subarrays I Array, Sliding Window β–Έ
Medium #3255 - Find the Power of K-Size Subarrays II Array, Sliding Window β–Έ
Medium #2657 - Find the Prefix Common Array of Two Arrays Array, Hash Table, Bit Manipulation β–Έ
Medium #2698 - Find the Punishment Number of an Integer Math, Backtracking β–Έ
Medium #2812 - Find the Safest Path in a Grid Array, Binary Search, Breadth-First Search, Union-Find, Heap (Priority Queue), Matrix β–Έ
Medium #3847 - Find the Score Difference in a Game Array, Simulation β–Έ
Medium #2640 - Find the Score of All Prefixes of an Array Array, Prefix Sum β–Έ
Medium #3324 - Find the Sequence of Strings Appeared on the Screen String, Simulation β–Έ
Medium #1283 - Find the Smallest Divisor Given a Threshold Array, Binary Search β–Έ
Medium #1894 - Find the Student that Will Replace the Chalk Array, Binary Search, Simulation, Prefix Sum β–Έ
Medium #2606 - Find the Substring With Maximum Cost Array, Hash Table, String, Dynamic Programming β–Έ
Medium #2740 - Find the Value of the Partition Array, Sorting β–Έ
Medium #1535 - Find the Winner of an Array Game Array, Simulation β–Έ
Medium #1823 - Find the Winner of the Circular Game Array, Math, Recursion, Queue, Simulation β–Έ
Medium #2177 - Find Three Consecutive Integers That Sum to a Given Number Math, Simulation β–Έ
Medium #2221 - Find Triangular Sum of an Array Array, Math, Simulation, Combinatorics, Number Theory β–Έ
Medium #1477 - Find Two Non-overlapping Sub-arrays Each With Target Sum Array, Hash Table, Binary Search, Dynamic Programming, Sliding Window β–Έ
Medium #1980 - Find Unique Binary String Array, Hash Table, String, Backtracking β–Έ
Medium #1605 - Find Valid Matrix Given Row and Column Sums Array, Greedy, Matrix β–Έ
Medium #3524 - Find X Value of Array I Array, Math, Dynamic Programming β–Έ
Medium #2527 - Find Xor-Beauty of Array Array, Math, Bit Manipulation β–Έ
Medium #1865 - Finding Pairs With a Certain Sum Array, Hash Table, Design β–Έ
Medium #1817 - Finding the Users Active Minutes Array, Hash Table β–Έ
Medium #2661 - First Completely Painted Row or Column Array, Hash Table, Matrix β–Έ
Medium #1997 - First Day Where You Have Been in All the Rooms Array, Dynamic Programming β–Έ
Medium #3843 - First Element with Unique Frequency Array, Hash Table, Counting β–Έ
Medium #1195 - Fizz Buzz Multithreaded Concurrency β–Έ
Medium FlattenAMultilevelDoublyLinkedList β–Έ
Medium #114 - Flatten Binary Tree to Linked List Linked List, Stack, Tree, Depth-First Search, Binary Tree β–Έ
Medium #2625 - Flatten Deeply Nested Array General β–Έ
Medium #341 - Flatten Nested List Iterator Stack, Tree, Depth-First Search, Design, Queue, Iterator β–Έ
Medium #971 - Flip Binary Tree To Match Preorder Traversal Tree, Depth-First Search, Binary Tree β–Έ
Medium #1072 - Flip Columns For Maximum Number of Equal Rows Array, Hash Table, Matrix β–Έ
Medium #951 - Flip Equivalent Binary Trees Tree, Depth-First Search, Binary Tree β–Έ
Medium #926 - Flip String to Monotone Increasing String, Dynamic Programming β–Έ
Medium #1042 - Flower Planting With No Adjacent Depth-First Search, Breadth-First Search, Graph Theory β–Έ
Medium #1764 - Form Array by Concatenating Subarrays of Another Array Array, Two Pointers, Greedy, String Matching β–Έ
Medium #1390 - Four Divisors Array, Math β–Έ
Medium FractionAdditionAndSubtraction β–Έ
Medium #166 - Fraction to Recurring Decimal Hash Table, Math, String β–Έ
Medium #1838 - Frequency of the Most Frequent Element Array, Binary Search, Greedy, Sliding Window, Sorting, Prefix Sum β–Έ
Medium #2671 - Frequency Tracker Hash Table, Design β–Έ
Medium #825 - Friends Of Appropriate Ages Array, Two Pointers, Binary Search, Sorting β–Έ
Medium #2498 - Frog Jump II Array, Binary Search, Greedy β–Έ
Medium #904 - Fruit Into Baskets Array, Hash Table, Sliding Window β–Έ
Medium #3479 - Fruits Into Baskets III Array, Binary Search, Segment Tree, Ordered Set β–Έ
Medium #1642 - Furthest Building You Can Reach Array, Greedy, Heap (Priority Queue) β–Έ
Medium #289 - Game of Life Array, Matrix, Simulation β–Έ
Medium #134 - Gas Station Array, Greedy β–Έ
Medium #3211 - Generate Binary Strings Without Adjacent Zeros String, Backtracking, Bit Manipulation β–Έ
Medium #22 - Generate Parentheses String, Dynamic Programming, Backtracking β–Έ
Medium GenerateRandomPointInACircle β–Έ
Medium #3680 - Generate Schedule Array, Math, Greedy β–Έ
Medium #1878 - Get Biggest Three Rhombus Sums in a Grid Array, Math, Sorting, Heap (Priority Queue), Matrix, Prefix Sum β–Έ
Medium #1208 - Get Equal Substrings Within Budget String, Binary Search, Sliding Window, Prefix Sum β–Έ
Medium #1311 - Get Watched Videos by Your Friends Array, Hash Table, Breadth-First Search, Graph Theory, Sorting β–Έ
Medium GlobalAndLocalInversions β–Έ
Medium #89 - Gray Code Math, Backtracking, Bit Manipulation β–Έ
Medium #1262 - Greatest Sum Divisible by Three Array, Dynamic Programming, Greedy, Sorting β–Έ
Medium #2017 - Grid Game Array, Matrix, Prefix Sum β–Έ
Medium #3552 - Grid Teleportation Traversal Array, Hash Table, Breadth-First Search, Matrix β–Έ
Medium #49 - Group Anagrams Array, Hash Table, String, Sorting β–Έ
Medium #2631 - Group By General β–Έ
Medium #1282 - Group the People Given the Group Size They Belong To Array, Hash Table, Greedy β–Έ
Medium #893 - Groups of Special-Equivalent Strings Array, Hash Table, String, Sorting β–Έ
Medium #1052 - Grumpy Bookstore Owner Array, Sliding Window β–Έ
Medium #375 - Guess Number Higher or Lower II Math, Dynamic Programming, Game Theory β–Έ
Medium #274 - H-Index Array, Sorting, Counting Sort β–Έ
Medium #275 - H-Index II Array, Binary Search β–Έ
Medium #846 - Hand of Straights Array, Hash Table, Greedy, Sorting β–Έ
Medium #2860 - Happy Students Array, Sorting, Enumeration β–Έ
Medium #3271 - Hash Divided String String, Simulation β–Έ
Medium Heaters β–Έ
Medium #2933 - High-Access Employees Array, Hash Table, String, Sorting β–Έ
Medium #198 - House Robber Array, Dynamic Programming β–Έ
Medium #213 - House Robber II Array, Dynamic Programming β–Έ
Medium #337 - House Robber III Dynamic Programming, Tree, Depth-First Search, Binary Tree β–Έ
Medium #2560 - House Robber IV Array, Binary Search, Dynamic Programming, Greedy β–Έ
Medium #3840 - House Robber V Array, Dynamic Programming β–Έ
Medium #1410 - HTML Entity Parser Hash Table, String β–Έ
Medium #3371 - Identify the Largest Outlier in an Array Array, Hash Table, Counting, Enumeration β–Έ
Medium #835 - Image Overlap Array, Matrix β–Έ
Medium #1174 - Immediate Food Delivery II Database β–Έ
Medium ImplementMagicDictionary β–Έ
Medium ImplementRand10UsingRand7 β–Έ
Medium #3508 - Implement Router Array, Hash Table, Binary Search, Design, Queue, Ordered Set β–Έ
Medium #208 - Implement Trie (Prefix Tree) Hash Table, String, Design, Trie β–Έ
Medium #334 - Increasing Triplet Subsequence Array, Greedy β–Έ
Medium #2536 - Increment Submatrices by One Array, Matrix, Prefix Sum β–Έ
Medium #1860 - Incremental Memory Leak Math, Simulation β–Έ
Medium #380 - Insert Delete GetRandom O(1) Array, Hash Table, Math, Design, Randomized β–Έ
Medium #2807 - Insert Greatest Common Divisors in Linked List Linked List, Math, Number Theory β–Έ
Medium #57 - Insert Interval Array β–Έ
Medium InsertIntoABinarySearchTree β–Έ
Medium #147 - Insertion Sort List Linked List, Sorting β–Έ
Medium #1080 - Insufficient Nodes in Root to Leaf Paths Tree, Depth-First Search, Binary Tree β–Έ
Medium #343 - Integer Break Math, Dynamic Programming β–Έ
Medium #397 - Integer Replacement Dynamic Programming, Greedy, Bit Manipulation, Memoization β–Έ
Medium #12 - Integer to Roman Hash Table, Math, String β–Έ
Medium #97 - Interleaving String String, Dynamic Programming β–Έ
Medium #986 - Interval List Intersections Array, Two Pointers, Sweep Line β–Έ
Medium #2121 - Intervals Between Identical Elements Array, Hash Table, Prefix Sum β–Έ
Medium #1169 - Invalid Transactions Array, Hash Table, String, Sorting β–Έ
Medium #3592 - Inverse Coin Change Array, Dynamic Programming β–Έ
Medium IsGraphBipartite β–Έ
Medium #1286 - Iterator for Combination String, Backtracking, Design, Iterator β–Έ
Medium #2722 - Join Two Arrays by ID General β–Έ
Medium #55 - Jump Game Array, Dynamic Programming, Greedy β–Έ
Medium #45 - Jump Game II Array, Dynamic Programming, Greedy β–Έ
Medium #1306 - Jump Game III Array, Depth-First Search, Breadth-First Search β–Έ
Medium #3660 - Jump Game IX Array, Dynamic Programming β–Έ
Medium #1696 - Jump Game VI Array, Dynamic Programming, Queue, Heap (Priority Queue), Monotonic Queue β–Έ
Medium #1871 - Jump Game VII String, Dynamic Programming, Sliding Window, Prefix Sum β–Έ
Medium #973 - K Closest Points to Origin Array, Math, Divide and Conquer, Geometry, Sorting, Heap (Priority Queue), Quickselect β–Έ
Medium #1191 - K-Concatenation Maximum Sum Array, Dynamic Programming β–Έ
Medium KDiffPairsInAnArray β–Έ
Medium #2261 - K Divisible Elements Subarrays Array, Hash Table, Trie, Rolling Hash, Hash Function, Enumeration β–Έ
Medium #2146 - K Highest Ranked Items Within a Price Range Array, Breadth-First Search, Sorting, Heap (Priority Queue), Matrix β–Έ
Medium #2090 - K Radius Subarray Averages Array, Sliding Window β–Έ
Medium #3319 - K-th Largest Perfect Subtree Size in Binary Tree Tree, Depth-First Search, Sorting, Binary Tree β–Έ
Medium #3275 - K-th Nearest Obstacle Queries Array, Heap (Priority Queue) β–Έ
Medium KThSmallestPrimeFraction β–Έ
Medium KThSymbolInGrammar β–Έ
Medium #841 - Keys and Rooms Depth-First Search, Breadth-First Search, Graph Theory β–Έ
Medium #935 - Knight Dialer Dynamic Programming β–Έ
Medium KnightProbabilityInChessboard β–Έ
Medium #875 - Koko Eating Bananas Array, Binary Search β–Έ
Medium #215 - Kth Largest Element in an Array Array, Divide and Conquer, Sorting, Heap (Priority Queue), Quickselect β–Έ
Medium #2583 - Kth Largest Sum in a Binary Tree Tree, Breadth-First Search, Sorting, Binary Tree β–Έ
Medium #230 - Kth Smallest Element in a BST Tree, Depth-First Search, Binary Search Tree, Binary Tree β–Έ
Medium #378 - Kth Smallest Element in a Sorted Matrix Array, Binary Search, Sorting, Heap (Priority Queue), Matrix β–Έ
Medium #1139 - Largest 1-Bordered Square Array, Dynamic Programming, Matrix β–Έ
Medium #2275 - Largest Combination With Bitwise AND Greater Than Zero Array, Hash Table, Bit Manipulation, Counting β–Έ
Medium #368 - Largest Divisible Subset Array, Math, Dynamic Programming, Sorting β–Έ
Medium #2789 - Largest Element in an Array after Merge Operations Array, Greedy β–Έ
Medium #1895 - Largest Magic Square Array, Matrix, Prefix Sum β–Έ
Medium #1754 - Largest Merge Of Two Strings Two Pointers, String, Greedy β–Έ
Medium #179 - Largest Number Array, String, Greedy, Sorting β–Έ
Medium #1946 - Largest Number After Mutating Substring Array, String, Greedy β–Έ
Medium #2384 - Largest Palindromic Number Hash Table, String, Greedy, Counting β–Έ
Medium LargestPlusSign β–Έ
Medium #3770 - Largest Prime from Consecutive Prime Sum Array, Math, Number Theory β–Έ
Medium #1727 - Largest Submatrix With Rearrangements Array, Greedy, Sorting, Matrix β–Έ
Medium #813 - Largest Sum of Averages Array, Dynamic Programming, Prefix Sum β–Έ
Medium #949 - Largest Time for Given Digits Array, String, Backtracking, Enumeration β–Έ
Medium #1090 - Largest Values From Labels Array, Hash Table, Greedy, Sorting, Counting β–Έ
Medium #1503 - Last Moment Before All Ants Fall Out of a Plank Array, Brainteaser, Simulation β–Έ
Medium #1204 - Last Person to Fit in the Bus Database β–Έ
Medium #1049 - Last Stone Weight II Array, Dynamic Programming β–Έ
Medium #1481 - Least Number of Unique Integers after K Removals Array, Hash Table, Greedy, Sorting, Counting β–Έ
Medium #873 - Length of Longest Fibonacci Subsequence Array, Hash Table, Dynamic Programming β–Έ
Medium #2958 - Length of Longest Subarray With at Most K Frequency Array, Hash Table, Sliding Window β–Έ
Medium #2414 - Length of the Longest Alphabetical Continuous Substring String β–Έ
Medium #2915 - Length of the Longest Subsequence That Sums to Target Array, Dynamic Programming β–Έ
Medium LetterCasePermutation β–Έ
Medium #17 - Letter Combinations of a Phone Number Hash Table, String, Backtracking β–Έ
Medium #1079 - Letter Tile Possibilities Hash Table, String, Backtracking, Counting β–Έ
Medium #386 - Lexicographical Numbers Depth-First Search, Trie β–Έ
Medium #3170 - Lexicographically Minimum String After Removing Stars Hash Table, String, Stack, Greedy, Heap (Priority Queue) β–Έ
Medium #1061 - Lexicographically Smallest Equivalent String String, Union-Find β–Έ
Medium #3752 - Lexicographically Smallest Negated Permutation that Sums to Target Array, Math, Two Pointers, Greedy, Sorting β–Έ
Medium #3720 - Lexicographically Smallest Permutation Greater Than Target Hash Table, String, Greedy, Counting, Enumeration β–Έ
Medium #1625 - Lexicographically Smallest String After Applying Operations String, Depth-First Search, Breadth-First Search, Enumeration β–Έ
Medium #3106 - Lexicographically Smallest String After Operations With Constraint String, Greedy β–Έ
Medium #3722 - Lexicographically Smallest String After Reverse Two Pointers, Binary Search, Enumeration β–Έ
Medium #2734 - Lexicographically Smallest String After Substring Operation String, Greedy β–Έ
Medium #817 - Linked List Components Array, Hash Table, Linked List β–Έ
Medium #142 - Linked List Cycle II Hash Table, Linked List, Two Pointers β–Έ
Medium #1367 - Linked List in Binary Tree Linked List, Tree, Depth-First Search, Binary Tree β–Έ
Medium #382 - Linked List Random Node Linked List, Math, Reservoir Sampling, Randomized β–Έ
Medium LogicalOrOfTwoBinaryGridsRepresentedAsQuadTrees β–Έ
Medium #388 - Longest Absolute File Path String, Stack, Depth-First Search β–Έ
Medium #3844 - Longest Almost-Palindromic Substring Two Pointers, String, Dynamic Programming β–Έ
Medium #1027 - Longest Arithmetic Subsequence Array, Hash Table, Binary Search, Dynamic Programming β–Έ
Medium #1218 - Longest Arithmetic Subsequence of Given Difference Array, Hash Table, Dynamic Programming β–Έ
Medium #3719 - Longest Balanced Subarray I Array, Hash Table, Divide and Conquer, Segment Tree, Prefix Sum β–Έ
Medium #3713 - Longest Balanced Substring I Hash Table, String, Counting, Enumeration β–Έ
Medium #3714 - Longest Balanced Substring II Hash Table, String, Prefix Sum β–Έ
Medium #2311 - Longest Binary Subsequence Less Than or Equal to K String, Dynamic Programming, Greedy, Memoization β–Έ
Medium #3598 - Longest Common Prefix Between Adjacent Strings After Removals Array, String β–Έ
Medium #1143 - Longest Common Subsequence String, Dynamic Programming β–Έ
Medium #128 - Longest Consecutive Sequence Array, Hash Table, Union-Find β–Έ
Medium #1438 - Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit Array, Queue, Sliding Window, Heap (Priority Queue), Ordered Set, Monotonic Queue β–Έ
Medium #3708 - Longest Fibonacci Subarray Array β–Έ
Medium #1405 - Longest Happy String String, Greedy, Heap (Priority Queue) β–Έ
Medium #2370 - Longest Ideal Subsequence Hash Table, String, Dynamic Programming β–Έ
Medium #300 - Longest Increasing Subsequence Array, Binary Search, Dynamic Programming β–Έ
Medium #845 - Longest Mountain in Array Array, Two Pointers, Dynamic Programming, Enumeration β–Έ
Medium #2401 - Longest Nice Subarray Array, Bit Manipulation, Sliding Window β–Έ
Medium #3738 - Longest Non-Decreasing Subarray After Replacing at Most One Element Array, Dynamic Programming β–Έ
Medium #2771 - Longest Non-decreasing Subarray From Two Arrays Array, Dynamic Programming β–Έ
Medium #3503 - Longest Palindrome After Substring Concatenation I Two Pointers, String, Dynamic Programming, Enumeration β–Έ
Medium #2131 - Longest Palindrome by Concatenating Two Letter Words Array, Hash Table, String, Greedy, Counting β–Έ
Medium LongestPalindromicSubsequence β–Έ
Medium #3472 - Longest Palindromic Subsequence After at Most K Operations String, Dynamic Programming β–Έ
Medium #5 - Longest Palindromic Substring Two Pointers, String, Dynamic Programming β–Έ
Medium LongestRepeatingCharacterReplacement β–Έ
Medium #2501 - Longest Square Streak in an Array Array, Hash Table, Binary Search, Dynamic Programming, Sorting β–Έ
Medium #3825 - Longest Strictly Increasing Subsequence With Non-Zero Bitwise AND Array, Binary Search, Bit Manipulation, Enumeration β–Έ
Medium #1048 - Longest String Chain Array, Hash Table, Two Pointers, String, Dynamic Programming, Sorting β–Έ
Medium #1493 - Longest Subarray of 1's After Deleting One Element Array, Dynamic Programming, Sliding Window β–Έ
Medium #2419 - Longest Subarray With Maximum Bitwise AND Array, Bit Manipulation, Brainteaser β–Έ
Medium #3409 - Longest Subsequence With Decreasing Adjacent Difference Array, Dynamic Programming β–Έ
Medium #3702 - Longest Subsequence With Non-Zero Bitwise XOR Array, Bit Manipulation β–Έ
Medium #1839 - Longest Substring Of All Vowels in Order String, Sliding Window β–Έ
Medium #395 - Longest Substring with At Least K Repeating Characters Hash Table, String, Divide and Conquer, Sliding Window β–Έ
Medium #3 - Longest Substring Without Repeating Characters Hash Table, String, Sliding Window β–Έ
Medium #978 - Longest Turbulent Subarray Array, Dynamic Programming, Sliding Window β–Έ
Medium LongestUncommonSubsequenceIi β–Έ
Medium #2901 - Longest Unequal Adjacent Groups Subsequence II Array, String, Dynamic Programming β–Έ
Medium LongestUnivaluePath β–Έ
Medium #2424 - Longest Uploaded Prefix Hash Table, Binary Search, Union-Find, Design, Binary Indexed Tree, Segment Tree, Heap (Priority Queue), Ordered Set β–Έ
Medium #1124 - Longest Well-Performing Interval Array, Hash Table, Stack, Monotonic Stack, Prefix Sum β–Έ
Medium LongestWordInDictionary β–Έ
Medium LongestWordInDictionaryThroughDeleting β–Έ
Medium #1372 - Longest ZigZag Path in a Binary Tree Dynamic Programming, Tree, Depth-First Search, Binary Tree β–Έ
Medium #851 - Loud and Rich Array, Depth-First Search, Graph Theory, Topological Sort β–Έ
Medium #235 - Lowest Common Ancestor of a Binary Search Tree Tree, Depth-First Search, Binary Search Tree, Binary Tree β–Έ
Medium #236 - Lowest Common Ancestor of a Binary Tree Tree, Depth-First Search, Binary Tree β–Έ
Medium #1123 - Lowest Common Ancestor of Deepest Leaves Hash Table, Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Medium #146 - LRU Cache Hash Table, Linked List, Design, Doubly-Linked List β–Έ
Medium #840 - Magic Squares In Grid Array, Hash Table, Math, Matrix β–Έ
Medium MagicalString β–Έ
Medium #1552 - Magnetic Force Between Two Balls Array, Binary Search, Sorting β–Έ
Medium #229 - Majority Element II Array, Hash Table, Sorting, Counting β–Έ
Medium #3523 - Make Array Non-decreasing Array, Stack, Greedy, Monotonic Stack β–Έ
Medium #2673 - Make Costs of Paths Equal in a Binary Tree Array, Dynamic Programming, Greedy, Tree, Binary Tree β–Έ
Medium #2607 - Make K-Subarray Sums Equal Array, Math, Greedy, Sorting, Number Theory β–Έ
Medium #2948 - Make Lexicographically Smallest Array by Swapping Elements Array, Union-Find, Sorting β–Έ
Medium #2531 - Make Number of Distinct Characters Equal Hash Table, String, Counting β–Έ
Medium #2825 - Make String a Subsequence Using Cyclic Increments Two Pointers, String β–Έ
Medium #1590 - Make Sum Divisible by P Array, Hash Table, Prefix Sum β–Έ
Medium #1487 - Making File Names Unique Array, Hash Table, String β–Έ
Medium #1765 - Map of Highest Peak Array, Breadth-First Search, Matrix β–Έ
Medium MapSumPairs β–Έ
Medium #3080 - Mark Elements on Array by Performing Queries Array, Hash Table, Sorting, Heap (Priority Queue), Simulation β–Έ
Medium #1158 - Market Analysis I Database β–Έ
Medium #831 - Masking Personal Information String β–Έ
Medium MatchsticksToSquare β–Έ
Medium #1314 - Matrix Block Sum Array, Matrix, Prefix Sum β–Έ
Medium MaxAreaOfIsland β–Έ
Medium MaxChunksToMakeSorted β–Έ
Medium #1004 - Max Consecutive Ones III Array, Binary Search, Sliding Window, Prefix Sum β–Έ
Medium #1432 - Max Difference You Can Get From Changing an Integer Math, Greedy β–Έ
Medium #807 - Max Increase to Keep City Skyline Array, Greedy, Matrix β–Έ
Medium #1679 - Max Number of K-Sum Pairs Array, Hash Table, Two Pointers, Sorting β–Έ
Medium #2342 - Max Sum of a Pair With Equal Sum of Digits Array, Hash Table, Sorting, Heap (Priority Queue) β–Έ
Medium #1615 - Maximal Network Rank Graph Theory β–Έ
Medium #2530 - Maximal Score After Applying K Operations Array, Greedy, Heap (Priority Queue) β–Έ
Medium #221 - Maximal Square Array, Dynamic Programming, Matrix β–Έ
Medium #3499 - Maximize Active Section with Trade I String, Enumeration β–Έ
Medium #3387 - Maximize Amount After Two Days of Conversions Array, String, Depth-First Search, Breadth-First Search, Graph Theory β–Έ
Medium #2943 - Maximize Area of Square Hole in Grid Array, Sorting β–Έ
Medium #849 - Maximize Distance to Closest Person Array β–Έ
Medium #2592 - Maximize Greatness of an Array Array, Two Pointers, Greedy, Sorting β–Έ
Medium #3075 - Maximize Happiness of Selected Children Array, Greedy, Sorting β–Έ
Medium #2207 - Maximize Number of Subsequences in a String String, Greedy, Prefix Sum β–Έ
Medium #3767 - Maximize Points After Choosing K Tasks Array, Greedy, Sorting, Heap (Priority Queue) β–Έ
Medium #3281 - Maximize Score of Numbers in Ranges Array, Binary Search, Greedy, Sorting β–Έ
Medium #3723 - Maximize Sum of Squares of Digits Math, Greedy β–Έ
Medium #2024 - Maximize the Confusion of an Exam String, Binary Search, Sliding Window, Prefix Sum β–Έ
Medium #3372 - Maximize the Number of Target Nodes After Connecting Trees I Tree, Depth-First Search, Breadth-First Search β–Έ
Medium #2830 - Maximize the Profit as the Salesman Array, Hash Table, Binary Search, Dynamic Programming, Sorting β–Έ
Medium #2202 - Maximize the Topmost Element After K Moves Array, Greedy β–Έ
Medium #3301 - Maximize the Total Height of Unique Towers Array, Greedy, Sorting β–Έ
Medium #3196 - Maximize Total Cost of Alternating Subarrays Array, Dynamic Programming β–Έ
Medium #2555 - Maximize Win From Two Segments Array, Binary Search, Sliding Window β–Έ
Medium #3572 - Maximize Y‑Sum by Picking a Triplet of Distinct X‑Values Array, Hash Table, Greedy, Sorting, Heap (Priority Queue) β–Έ
Medium #1749 - Maximum Absolute Sum of Any Subarray Array, Dynamic Programming β–Έ
Medium #1911 - Maximum Alternating Subsequence Sum Array, Dynamic Programming β–Έ
Medium #3727 - Maximum Alternating Sum of Squares Array, Greedy, Sorting β–Έ
Medium #3418 - Maximum Amount of Money Robot Can Earn Array, Dynamic Programming, Matrix β–Έ
Medium #3428 - Maximum and Minimum Sums of at Most Size K Subsequences Array, Math, Dynamic Programming, Sorting, Combinatorics β–Έ
Medium #1465 - Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts Array, Greedy, Sorting β–Έ
Medium #3380 - Maximum Area Rectangle With Point Constraints I Array, Math, Binary Indexed Tree, Segment Tree, Geometry, Sorting, Enumeration β–Έ
Medium #1792 - Maximum Average Pass Ratio Array, Greedy, Heap (Priority Queue) β–Έ
Medium #2279 - Maximum Bags With Full Capacity of Rocks Array, Greedy, Sorting β–Έ
Medium #3638 - Maximum Balanced Shipments Array, Dynamic Programming, Stack, Greedy, Monotonic Stack β–Έ
Medium #2779 - Maximum Beauty of an Array After Applying Operation Array, Binary Search, Sliding Window, Sorting β–Έ
Medium #1702 - Maximum Binary String After Change String, Greedy β–Έ
Medium MaximumBinaryTree β–Έ
Medium #998 - Maximum Binary Tree II Tree, Binary Tree β–Έ
Medium #3849 - Maximum Bitwise XOR After Rearrangement String, Greedy, Bit Manipulation β–Έ
Medium #2226 - Maximum Candies Allocated to K Children Array, Binary Search β–Έ
Medium #3814 - Maximum Capacity Within Budget Array, Two Pointers, Binary Search, Sorting β–Έ
Medium #3413 - Maximum Coins From K Consecutive Bags Array, Binary Search, Greedy, Sliding Window, Sorting, Prefix Sum β–Έ
Medium #1947 - Maximum Compatibility Score Sum Array, Dynamic Programming, Backtracking, Bit Manipulation, Bitmask β–Έ
Medium #2274 - Maximum Consecutive Floors Without Special Floors Array, Sorting β–Έ
Medium #1026 - Maximum Difference Between Node and Ancestor Tree, Depth-First Search, Binary Tree β–Έ
Medium #3148 - Maximum Difference Score in a Grid Array, Dynamic Programming, Matrix β–Έ
Medium #1855 - Maximum Distance Between a Pair of Values Array, Two Pointers, Binary Search β–Έ
Medium MaximumDistanceInArrays β–Έ
Medium #2008 - Maximum Earnings From Taxi Array, Hash Table, Binary Search, Dynamic Programming, Sorting β–Έ
Medium #1846 - Maximum Element After Decreasing and Rearranging Array, Greedy, Sorting β–Έ
Medium #3259 - Maximum Energy Boost From Two Drinks Array, Dynamic Programming β–Έ
Medium #1695 - Maximum Erasure Value Array, Hash Table, Sliding Window β–Έ
Medium #3434 - Maximum Frequency After Subarray Operation Array, Hash Table, Dynamic Programming, Greedy, Enumeration, Prefix Sum β–Έ
Medium #3346 - Maximum Frequency of an Element After Performing Operations I Array, Binary Search, Sliding Window, Sorting, Prefix Sum β–Έ
Medium #164 - Maximum Gap Array, Sorting, Bucket Sort, Radix Sort β–Έ
Medium #3026 - Maximum Good Subarray Sum Array, Hash Table, Prefix Sum β–Έ
Medium #1833 - Maximum Ice Cream Bars Array, Greedy, Sorting, Counting Sort β–Έ
Medium #3644 - Maximum K to Sort a Permutation Array, Bit Manipulation β–Έ
Medium #1239 - Maximum Length of a Concatenated String with Unique Characters Array, String, Backtracking, Bit Manipulation β–Έ
Medium MaximumLengthOfPairChain β–Έ
Medium MaximumLengthOfRepeatedSubarray β–Έ
Medium #1567 - Maximum Length of Subarray With Positive Product Array, Dynamic Programming, Greedy β–Έ
Medium #1161 - Maximum Level Sum of a Binary Tree Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Medium #3443 - Maximum Manhattan Distance After K Changes Hash Table, Math, String, Counting β–Έ
Medium #2410 - Maximum Matching of Players With Trainers Array, Two Pointers, Greedy, Sorting β–Έ
Medium #1975 - Maximum Matrix Sum Array, Greedy, Matrix β–Έ
Medium #3627 - Maximum Median Sum of Subsequences of Size 3 Array, Math, Greedy, Sorting, Game Theory β–Έ
Medium #3290 - Maximum Multiplication Score Array, Dynamic Programming β–Έ
Medium #1111 - Maximum Nesting Depth of Two Valid Parentheses Strings String, Stack β–Έ
Medium #1594 - Maximum Non Negative Product in a Matrix Array, Dynamic Programming, Matrix β–Έ
Medium #2861 - Maximum Number of Alloys Array, Binary Search β–Έ
Medium #1561 - Maximum Number of Coins You Can Get Array, Math, Greedy, Sorting, Game Theory β–Έ
Medium #1798 - Maximum Number of Consecutive Values You Can Make Array, Greedy, Sorting β–Έ
Medium #3397 - Maximum Number of Distinct Elements After Operations Array, Greedy, Sorting β–Έ
Medium #1705 - Maximum Number of Eaten Apples Array, Greedy, Heap (Priority Queue) β–Έ
Medium #1353 - Maximum Number of Events That Can Be Attended Array, Greedy, Sorting, Heap (Priority Queue) β–Έ
Medium #2658 - Maximum Number of Fish in a Grid Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix β–Έ
Medium #2358 - Maximum Number of Groups Entering a Competition Array, Math, Binary Search, Greedy β–Έ
Medium #2554 - Maximum Number of Integers to Choose From a Range I Array, Hash Table, Binary Search, Greedy, Sorting β–Έ
Medium #2770 - Maximum Number of Jumps to Reach the Last Index Array, Dynamic Programming β–Έ
Medium #2684 - Maximum Number of Moves in a Grid Array, Dynamic Programming, Matrix β–Έ
Medium #1546 - Maximum Number of Non-Overlapping Subarrays With Sum Equals Target Array, Hash Table, Greedy, Prefix Sum β–Έ
Medium #1297 - Maximum Number of Occurrences of a Substring Hash Table, String, Sliding Window β–Έ
Medium #3228 - Maximum Number of Operations to Move Ones to the End String, Greedy, Counting β–Έ
Medium #3040 - Maximum Number of Operations With the Same Score II Array, Dynamic Programming, Memoization β–Έ
Medium #1937 - Maximum Number of Points with Cost Array, Dynamic Programming, Matrix β–Έ
Medium #1898 - Maximum Number of Removable Characters Array, Two Pointers, String, Binary Search β–Έ
Medium #3628 - Maximum Number of Subsequences After One Inserting String, Dynamic Programming, Greedy, Prefix Sum β–Έ
Medium #1456 - Maximum Number of Vowels in a Substring of Given Length String, Sliding Window β–Έ
Medium #1953 - Maximum Number of Weeks for Which You Can Work Array, Greedy β–Έ
Medium #3007 - Maximum Number That Sum of the Prices Is Less Than or Equal to K Math, Binary Search, Dynamic Programming, Bit Manipulation β–Έ
Medium #1131 - Maximum of Absolute Value Expression Array, Math β–Έ
Medium #2680 - Maximum OR Array, Greedy, Bit Manipulation, Prefix Sum β–Έ
Medium #3035 - Maximum Palindromes After Operations Array, Hash Table, String, Greedy, Sorting, Counting β–Έ
Medium #3742 - Maximum Path Score in a Grid Array, Dynamic Programming, Matrix β–Έ
Medium #3207 - Maximum Points After Enemy Battles Array, Greedy β–Έ
Medium #2212 - Maximum Points in an Archery Competition Array, Backtracking, Bit Manipulation, Enumeration β–Έ
Medium #3143 - Maximum Points Inside the Square Array, Hash Table, String, Binary Search, Sorting β–Έ
Medium #3332 - Maximum Points Tourist Can Earn Array, Dynamic Programming, Matrix β–Έ
Medium #1423 - Maximum Points You Can Obtain from Cards Array, Sliding Window, Prefix Sum β–Έ
Medium #3309 - Maximum Possible Number by Binary Concatenation Array, Bit Manipulation, Enumeration β–Έ
Medium #3115 - Maximum Prime Difference Array, Math, Number Theory β–Έ
Medium #2233 - Maximum Product After K Increments Array, Greedy, Heap (Priority Queue) β–Έ
Medium #3584 - Maximum Product of First and Last Elements of a Subsequence Array, Two Pointers β–Έ
Medium #1339 - Maximum Product of Splitted Binary Tree Tree, Depth-First Search, Binary Tree β–Έ
Medium #2002 - Maximum Product of the Length of Two Palindromic Subsequences String, Dynamic Programming, Backtracking, Bit Manipulation, Bitmask β–Έ
Medium #3732 - Maximum Product of Three Elements After One Replacement Array, Math, Greedy, Sorting β–Έ
Medium #3670 - Maximum Product of Two Integers With No Common Bits Array, Dynamic Programming, Bit Manipulation β–Έ
Medium #318 - Maximum Product of Word Lengths Array, String, Bit Manipulation β–Έ
Medium #152 - Maximum Product Subarray Array, Dynamic Programming β–Έ
Medium #1599 - Maximum Profit of Operating a Centennial Wheel Array, Simulation β–Έ
Medium #2397 - Maximum Rows Covered by Columns Array, Backtracking, Bit Manipulation, Matrix, Enumeration β–Έ
Medium #2925 - Maximum Score After Applying Operations on a Tree Dynamic Programming, Tree, Depth-First Search β–Έ
Medium #3781 - Maximum Score After Binary Swaps Array, String, Greedy, Heap (Priority Queue) β–Έ
Medium #1753 - Maximum Score From Removing Stones Math, Greedy, Heap (Priority Queue) β–Έ
Medium #1717 - Maximum Score From Removing Substrings String, Stack, Greedy β–Έ
Medium #3788 - Maximum Score of a Split Array, Prefix Sum β–Έ
Medium #1292 - Maximum Side Length of a Square with Sum Less than or Equal to Threshold Array, Binary Search, Matrix, Prefix Sum β–Έ
Medium #3002 - Maximum Size of a Set After Removals Array, Hash Table, Greedy β–Έ
Medium #2178 - Maximum Split of Positive Even Integers Math, Backtracking, Greedy β–Έ
Medium #2975 - Maximum Square Area by Removing Fences From a Field Array, Hash Table, Enumeration β–Έ
Medium #2497 - Maximum Star Sum of a Graph Array, Greedy, Graph Theory, Sorting, Heap (Priority Queue) β–Έ
Medium #2708 - Maximum Strength of a Group Array, Dynamic Programming, Backtracking, Greedy, Bit Manipulation, Sorting, Enumeration β–Έ
Medium #53 - Maximum Subarray Array, Divide and Conquer, Dynamic Programming β–Έ
Medium #1856 - Maximum Subarray Min-Product Array, Stack, Monotonic Stack, Prefix Sum β–Έ
Medium #3381 - Maximum Subarray Sum With Length Divisible by K Array, Hash Table, Prefix Sum β–Έ
Medium #1186 - Maximum Subarray Sum with One Deletion Array, Dynamic Programming β–Έ
Medium #2542 - Maximum Subsequence Score Array, Greedy, Sorting, Heap (Priority Queue) β–Έ
Medium #3760 - Maximum Substrings With Distinct Start Hash Table, String β–Έ
Medium #918 - Maximum Sum Circular Subarray Array, Divide and Conquer, Dynamic Programming, Queue, Monotonic Queue β–Έ
Medium #1589 - Maximum Sum Obtained of Any Permutation Array, Greedy, Sorting, Prefix Sum β–Έ
Medium #2841 - Maximum Sum of Almost Unique Subarray Array, Hash Table, Sliding Window β–Έ
Medium #2428 - Maximum Sum of an Hourglass Array, Matrix, Prefix Sum β–Έ
Medium #2461 - Maximum Sum of Distinct Subarrays With Length K Array, Hash Table, Sliding Window β–Έ
Medium #3780 - Maximum Sum of Three Numbers Divisible by Three Array, Greedy, Sorting, Heap (Priority Queue) β–Έ
Medium #1031 - Maximum Sum of Two Non-Overlapping Subarrays Array, Dynamic Programming, Sliding Window β–Έ
Medium #3462 - Maximum Sum With at Most K Elements Array, Greedy, Sorting, Heap (Priority Queue), Matrix β–Έ
Medium MaximumSwap β–Έ
Medium #2517 - Maximum Tastiness of Candy Basket Array, Binary Search, Greedy, Sorting β–Έ
Medium #3186 - Maximum Total Damage With Spell Casting Array, Hash Table, Two Pointers, Binary Search, Dynamic Programming, Sorting, Counting β–Έ
Medium #3645 - Maximum Total from Optimal Activation Order Array, Two Pointers, Greedy, Sorting, Heap (Priority Queue) β–Έ
Medium #2285 - Maximum Total Importance of Roads Greedy, Graph Theory, Sorting, Heap (Priority Queue) β–Έ
Medium #3180 - Maximum Total Reward Using Operations I Array, Dynamic Programming β–Έ
Medium #3689 - Maximum Total Subarray Value I Array, Greedy β–Έ
Medium #2245 - Maximum Trailing Zeros in a Cornered Path Array, Matrix, Prefix Sum β–Έ
Medium #2130 - Maximum Twin Sum of a Linked List Linked List, Two Pointers, Stack β–Έ
Medium #1881 - Maximum Value after Insertion String, Greedy β–Έ
Medium #1802 - Maximum Value at a Given Index in a Bounded Array Math, Binary Search, Greedy β–Έ
Medium #2874 - Maximum Value of an Ordered Triplet II Array β–Έ
Medium #3543 - Maximum Weighted K-Edge Path Hash Table, Dynamic Programming, Graph Theory β–Έ
Medium #2271 - Maximum White Tiles Covered by a Carpet Array, Binary Search, Greedy, Sliding Window, Sorting, Prefix Sum β–Έ
Medium MaximumWidthOfBinaryTree β–Έ
Medium #962 - Maximum Width Ramp Array, Two Pointers, Stack, Monotonic Stack β–Έ
Medium #2317 - Maximum XOR After Operations Array, Math, Bit Manipulation β–Έ
Medium #1829 - Maximum XOR for Each Query Array, Bit Manipulation, Prefix Sum β–Έ
Medium MaximumXorOfTwoNumbersInAnArray β–Έ
Medium #2939 - Maximum Xor Product Math, Greedy, Bit Manipulation β–Έ
Medium #2623 - Memoize General β–Έ
Medium #3834 - Merge Adjacent Equal Elements Array, Stack, Simulation β–Έ
Medium #3853 - Merge Close Characters General β–Έ
Medium #1669 - Merge In Between Linked Lists Linked List β–Έ
Medium #56 - Merge Intervals Array, Sorting β–Έ
Medium #2181 - Merge Nodes in Between Zeros Linked List, Simulation β–Έ
Medium #1899 - Merge Triplets to Form Target Triplet Array, Greedy β–Έ
Medium #2611 - Mice and Cheese Array, Greedy, Sorting, Heap (Priority Queue) β–Έ
Medium #1584 - Min Cost to Connect All Points Array, Union-Find, Graph Theory, Minimum Spanning Tree β–Έ
Medium Minesweeper β–Έ
Medium #385 - Mini Parser String, Stack, Depth-First Search β–Έ
Medium #155 - Min Stack Stack, Design β–Έ
Medium #1722 - Minimize Hamming Distance After Swap Operations Array, Depth-First Search, Union-Find β–Έ
Medium #3012 - Minimize Length of Array Using Operations Array, Math, Greedy, Number Theory β–Έ
Medium #3613 - Minimize Maximum Component Cost Binary Search, Union-Find, Graph Theory, Sorting β–Έ
Medium #2439 - Minimize Maximum of Array Array, Binary Search, Dynamic Programming, Greedy, Prefix Sum β–Έ
Medium #1877 - Minimize Maximum Pair Sum in Array Array, Two Pointers, Greedy, Sorting β–Έ
Medium #2232 - Minimize Result by Adding Parentheses to Expression String, Enumeration β–Έ
Medium #1981 - Minimize the Difference Between Target and Chosen Elements Array, Dynamic Programming, Matrix β–Έ
Medium #2616 - Minimize the Maximum Difference of Pairs Array, Binary Search, Dynamic Programming, Greedy, Sorting β–Έ
Medium #3419 - Minimize the Maximum Edge Weight of Graph Binary Search, Depth-First Search, Breadth-First Search, Graph Theory, Shortest Path β–Έ
Medium #2513 - Minimize the Maximum of Two Arrays Math, Binary Search, Number Theory β–Έ
Medium #2429 - Minimize XOR Greedy, Bit Manipulation β–Έ
Medium #2064 - Minimized Maximum of Products Distributed to Any Store Array, Binary Search, Greedy β–Έ
Medium #2817 - Minimum Absolute Difference Between Elements With Constraint Array, Binary Search, Ordered Set β–Έ
Medium #3567 - Minimum Absolute Difference in Sliding Submatrix Array, Sorting, Matrix β–Έ
Medium #1906 - Minimum Absolute Difference Queries Array, Prefix Sum β–Έ
Medium #3761 - Minimum Absolute Distance Between Mirror Pairs Array, Hash Table, Math β–Έ
Medium #1818 - Minimum Absolute Sum Difference Array, Binary Search, Sorting, Ordered Set β–Έ
Medium #921 - Minimum Add to Make Parentheses Valid String, Stack, Greedy β–Έ
Medium #2457 - Minimum Addition to Make Integer Beautiful Math, Greedy β–Έ
Medium #2645 - Minimum Additions to Make Valid String String, Dynamic Programming, Stack, Greedy β–Έ
Medium #3587 - Minimum Adjacent Swaps to Alternate Parity Array, Greedy β–Έ
Medium #1850 - Minimum Adjacent Swaps to Reach the Kth Smallest Number Two Pointers, String, Greedy β–Έ
Medium #2391 - Minimum Amount of Time to Collect Garbage Array, String, Prefix Sum β–Έ
Medium #939 - Minimum Area Rectangle Array, Hash Table, Math, Geometry, Sorting β–Έ
Medium #963 - Minimum Area Rectangle II Array, Hash Table, Math, Geometry β–Έ
Medium #3224 - Minimum Array Changes to Make Differences Equal Array, Hash Table, Prefix Sum β–Έ
Medium #3133 - Minimum Array End Bit Manipulation β–Έ
Medium #2856 - Minimum Array Length After Pair Removals Array, Hash Table, Two Pointers, Binary Search, Greedy, Counting β–Έ
Medium #3366 - Minimum Array Sum Array, Dynamic Programming β–Έ
Medium MinimumAsciiDeleteSumForTwoStrings β–Έ
Medium #2256 - Minimum Average Difference Array, Prefix Sum β–Έ
Medium #3858 - Minimum Bitwise OR From Grid General β–Έ
Medium #2260 - Minimum Consecutive Cards to Pick Up Array, Hash Table, Sliding Window β–Έ
Medium #3218 - Minimum Cost for Cutting Cake I Array, Two Pointers, Dynamic Programming, Greedy, Sorting β–Έ
Medium #983 - Minimum Cost For Tickets Array, Dynamic Programming β–Έ
Medium #2087 - Minimum Cost Homecoming of a Robot in a Grid Array, Greedy β–Έ
Medium #2662 - Minimum Cost of a Path With Special Roads Array, Graph Theory, Heap (Priority Queue), Shortest Path β–Έ
Medium #3603 - Minimum Cost Path with Alternating Directions II Array, Dynamic Programming, Matrix β–Έ
Medium #3650 - Minimum Cost Path with Edge Reversals Graph Theory, Heap (Priority Queue), Shortest Path β–Έ
Medium #3789 - Minimum Cost to Acquire Required Items Math, Greedy β–Έ
Medium #2976 - Minimum Cost to Convert String I Array, String, Graph Theory, Shortest Path β–Έ
Medium #2712 - Minimum Cost to Make All Characters Equal String, Dynamic Programming, Greedy β–Έ
Medium #2967 - Minimum Cost to Make Array Equalindromic Array, Math, Binary Search, Greedy, Sorting β–Έ
Medium #3424 - Minimum Cost to Make Arrays Identical Array, Greedy, Sorting β–Έ
Medium #3800 - Minimum Cost to Make Two Binary Strings Equal String, Greedy β–Έ
Medium #2162 - Minimum Cost to Set Cooking Time Math, Enumeration β–Έ
Medium #3857 - Minimum Cost to Split into Ones General β–Έ
Medium #1130 - Minimum Cost Tree From Leaf Values Array, Dynamic Programming, Stack, Greedy, Monotonic Stack β–Έ
Medium #3784 - Minimum Deletion Cost to Make All Characters Equal Array, Hash Table, String, Enumeration β–Έ
Medium #2216 - Minimum Deletions to Make Array Beautiful Array, Stack, Greedy β–Έ
Medium #1647 - Minimum Deletions to Make Character Frequencies Unique Hash Table, String, Greedy, Sorting β–Έ
Medium #1653 - Minimum Deletions to Make String Balanced String, Dynamic Programming, Stack β–Έ
Medium #3085 - Minimum Deletions to Make String K-Special Hash Table, String, Greedy, Sorting, Counting β–Έ
Medium #1509 - Minimum Difference Between Largest and Smallest Value in Three Moves Array, Greedy, Sorting β–Έ
Medium #3679 - Minimum Discards to Balance Inventory Array, Hash Table, Sliding Window, Simulation, Counting β–Έ
Medium #3741 - Minimum Distance Between Three Equal Elements II Array, Hash Table β–Έ
Medium #3326 - Minimum Division Operations to Make Array Non Decreasing Array, Math, Greedy, Number Theory β–Έ
Medium #1007 - Minimum Domino Rotations For Equal Row Array, Greedy β–Έ
Medium #1785 - Minimum Elements to Add to Form a Given Sum Array, Greedy β–Έ
Medium #2918 - Minimum Equal Sum of Two Arrays After Replacing Zeros Array, Greedy β–Έ
Medium #931 - Minimum Falling Path Sum Array, Dynamic Programming, Matrix β–Έ
Medium #1318 - Minimum Flips to Make a OR b Equal to c Bit Manipulation β–Έ
Medium #2477 - Minimum Fuel Cost to Report to the Capital Tree, Depth-First Search, Breadth-First Search, Graph Theory β–Έ
Medium #1954 - Minimum Garden Perimeter to Collect Enough Apples Math, Binary Search β–Έ
Medium MinimumGeneticMutation β–Έ
Medium #310 - Minimum Height Trees Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort β–Έ
Medium #2568 - Minimum Impossible OR Array, Bit Manipulation, Brainteaser β–Έ
Medium #2919 - Minimum Increment Operations to Make Array Beautiful Array, Dynamic Programming β–Έ
Medium #945 - Minimum Increment to Make Array Unique Array, Greedy, Sorting, Counting β–Έ
Medium #3593 - Minimum Increments to Equalize Leaf Paths Array, Dynamic Programming, Tree, Depth-First Search β–Έ
Medium #2780 - Minimum Index of a Valid Split Array, Hash Table, Sorting β–Έ
Medium #1541 - Minimum Insertions to Balance a Parentheses String String, Stack, Greedy β–Έ
Medium #3629 - Minimum Jumps to Reach End via Prime Teleportation Array, Hash Table, Math, Breadth-First Search, Number Theory β–Έ
Medium #1654 - Minimum Jumps to Reach Home Array, Hash Table, Breadth-First Search β–Έ
Medium #3824 - Minimum K to Reduce Array Within Limit Array, Binary Search β–Έ
Medium #3138 - Minimum Length of Anagram Concatenation Hash Table, String, Counting β–Έ
Medium #1750 - Minimum Length of String After Deleting Similar Ends Two Pointers, String β–Έ
Medium #3223 - Minimum Length of String After Operations Hash Table, String, Counting β–Έ
Medium #3096 - Minimum Levels to Gain More Points Array, Prefix Sum β–Έ
Medium #1760 - Minimum Limit of Balls in a Bag Array, Binary Search β–Έ
Medium #2280 - Minimum Lines to Represent a Line Chart Array, Math, Geometry, Sorting, Number Theory β–Έ
Medium #3776 - Minimum Moves to Balance Circular Array Array, Greedy, Sorting β–Έ
Medium #3001 - Minimum Moves to Capture The Queen Math, Enumeration β–Έ
Medium #3568 - Minimum Moves to Clean the Classroom Array, Hash Table, Bit Manipulation, Breadth-First Search, Matrix β–Έ
Medium MinimumMovesToEqualArrayElements β–Έ
Medium MinimumMovesToEqualArrayElementsIi β–Έ
Medium #1674 - Minimum Moves to Make Array Complementary Array, Hash Table, Prefix Sum β–Έ
Medium #2139 - Minimum Moves to Reach Target Score Math, Greedy β–Έ
Medium #2850 - Minimum Moves to Spread Stones Over Grid Array, Dynamic Programming, Backtracking, Bit Manipulation, Matrix, Bitmask β–Έ
Medium #1969 - Minimum Non-Zero Product of the Array Elements Math, Greedy, Recursion β–Έ
Medium LeetCode #452 – Minimum Number of Arrows to Burst Balloons Array, Greedy, Sorting β–Έ
Medium #2914 - Minimum Number of Changes to Make Binary String Beautiful String β–Έ
Medium #2944 - Minimum Number of Coins for Fruits Array, Dynamic Programming, Queue, Heap (Priority Queue), Monotonic Queue β–Έ
Medium #2952 - Minimum Number of Coins to be Added Array, Greedy, Sorting β–Έ
Medium #1482 - Minimum Number of Days to Make m Bouquets Array, Binary Search β–Έ
Medium #3239 - Minimum Number of Flips to Make Binary Grid Palindromic I Array, Two Pointers, Matrix β–Έ
Medium #3240 - Minimum Number of Flips to Make Binary Grid Palindromic II Array, Two Pointers, Matrix β–Έ
Medium #1888 - Minimum Number of Flips to Make the Binary String Alternating String, Dynamic Programming, Sliding Window β–Έ
Medium #2086 - Minimum Number of Food Buckets to Feed the Hamsters String, Dynamic Programming, Greedy β–Έ
Medium #1419 - Minimum Number of Frogs Croaking String, Counting β–Έ
Medium #2910 - Minimum Number of Groups to Create a Valid Assignment Array, Hash Table, Greedy β–Έ
Medium #3779 - Minimum Number of Operations to Have Distinct Elements Array, Hash Table β–Έ
Medium #2654 - Minimum Number of Operations to Make All Array Elements Equal to 1 Array, Math, Number Theory β–Έ
Medium #2870 - Minimum Number of Operations to Make Array Empty Array, Hash Table, Greedy, Counting β–Έ
Medium #2997 - Minimum Number of Operations to Make Array XOR Equal to K Array, Bit Manipulation β–Έ
Medium #3137 - Minimum Number of Operations to Make Word K-Periodic Hash Table, String, Counting β–Έ
Medium #2998 - Minimum Number of Operations to Make X and Y Equal Dynamic Programming, Breadth-First Search, Memoization β–Έ
Medium #1769 - Minimum Number of Operations to Move All Balls to Each Box Array, String, Prefix Sum β–Έ
Medium #1806 - Minimum Number of Operations to Reinitialize a Permutation Array, Math, Simulation β–Έ
Medium #3122 - Minimum Number of Operations to Satisfy Conditions Array, Dynamic Programming, Matrix β–Έ
Medium #2471 - Minimum Number of Operations to Sort a Binary Tree by Level Tree, Breadth-First Search, Binary Tree β–Έ
Medium #1733 - Minimum Number of People to Teach Array, Hash Table, Greedy β–Έ
Medium #3016 - Minimum Number of Pushes to Type Word II Hash Table, String, Greedy, Sorting, Counting β–Έ
Medium #3296 - Minimum Number of Seconds to Make Mountain Height Zero Array, Math, Binary Search, Greedy, Heap (Priority Queue) β–Έ
Medium #1347 - Minimum Number of Steps to Make Two Strings Anagram Hash Table, String, Counting β–Έ
Medium #2186 - Minimum Number of Steps to Make Two Strings Anagram II Hash Table, String, Counting β–Έ
Medium #1864 - Minimum Number of Swaps to Make the Binary String Alternating String, Greedy β–Έ
Medium #1963 - Minimum Number of Swaps to Make the String Balanced Two Pointers, String, Stack, Greedy β–Έ
Medium #3291 - Minimum Number of Valid Strings to Form Target I Array, String, Binary Search, Dynamic Programming, Trie, Segment Tree, Rolling Hash, String Matching, Hash Function β–Έ
Medium #1557 - Minimum Number of Vertices to Reach All Nodes Graph Theory β–Έ
Medium #1986 - Minimum Number of Work Sessions to Finish the Tasks Array, Dynamic Programming, Backtracking, Bit Manipulation, Bitmask β–Έ
Medium #1558 - Minimum Numbers of Function Calls to Make Target Array Array, Greedy, Bit Manipulation β–Έ
Medium #3542 - Minimum Operations to Convert All Elements to Zero Array, Hash Table, Stack, Greedy, Monotonic Stack β–Έ
Medium #2059 - Minimum Operations to Convert Number Array, Breadth-First Search β–Έ
Medium #3066 - Minimum Operations to Exceed Threshold Value II Array, Heap (Priority Queue), Simulation β–Έ
Medium #2208 - Minimum Operations to Halve Array Sum Array, Greedy, Heap (Priority Queue) β–Έ
Medium #2844 - Minimum Operations to Make a Special Number Math, String, Greedy, Enumeration β–Έ
Medium #2033 - Minimum Operations to Make a Uni-Value Grid Array, Math, Sorting, Matrix β–Έ
Medium #2602 - Minimum Operations to Make All Array Elements Equal Array, Binary Search, Sorting, Prefix Sum β–Έ
Medium #1551 - Minimum Operations to Make Array Equal Math β–Έ
Medium #2541 - Minimum Operations to Make Array Equal II Array, Math, Greedy β–Έ
Medium #3854 - Minimum Operations to Make Array Parity Alternating General β–Έ
Medium #3191 - Minimum Operations to Make Binary Array Elements Equal to One I Array, Bit Manipulation, Queue, Sliding Window, Prefix Sum β–Έ
Medium #3192 - Minimum Operations to Make Binary Array Elements Equal to One II Array, Dynamic Programming, Greedy β–Έ
Medium #3766 - Minimum Operations to Make Binary Palindrome Array, Two Pointers, Binary Search, Bit Manipulation β–Έ
Medium #3107 - Minimum Operations to Make Median of Array Equal to K Array, Greedy, Sorting β–Έ
Medium #2170 - Minimum Operations to Make the Array Alternating Array, Hash Table, Greedy, Counting β–Έ
Medium #2749 - Minimum Operations to Make the Integer Zero Bit Manipulation, Brainteaser, Enumeration β–Έ
Medium #2934 - Minimum Operations to Maximize Last Elements in Arrays Array, Enumeration β–Έ
Medium #3810 - Minimum Operations to Reach Target Array Array, Hash Table, Greedy β–Έ
Medium #2571 - Minimum Operations to Reduce an Integer to 0 Dynamic Programming, Greedy, Bit Manipulation β–Έ
Medium #1658 - Minimum Operations to Reduce X to Zero Array, Hash Table, Binary Search, Sliding Window, Prefix Sum β–Έ
Medium #3724 - Minimum Operations to Transform Array Array, Greedy β–Έ
Medium #3675 - Minimum Operations to Transform String String, Greedy β–Έ
Medium #3071 - Minimum Operations to Write the Letter Y on a Grid Array, Hash Table, Matrix, Counting β–Έ
Medium #2304 - Minimum Path Cost in a Grid Array, Dynamic Programming, Matrix β–Έ
Medium #64 - Minimum Path Sum Array, Dynamic Programming, Matrix β–Έ
Medium #2483 - Minimum Penalty for a Shop String, Prefix Sum β–Έ
Medium #3818 - Minimum Prefix Removal to Make Array Strictly Increasing Array β–Έ
Medium #2895 - Minimum Processing Time Array, Greedy, Sorting β–Έ
Medium #3111 - Minimum Rectangles to Cover Points Array, Greedy, Sorting β–Έ
Medium #3634 - Minimum Removals to Balance Array Array, Binary Search, Sliding Window, Sorting β–Έ
Medium #1249 - Minimum Remove to Make Valid Parentheses String, Stack β–Έ
Medium #2244 - Minimum Rounds to Complete All Tasks Array, Hash Table, Greedy, Counting β–Έ
Medium #2567 - Minimum Score by Changing Two Elements Array, Greedy, Sorting β–Έ
Medium #2492 - Minimum Score of a Path Between Two Cities Depth-First Search, Breadth-First Search, Union-Find, Graph Theory β–Έ
Medium #1039 - Minimum Score Triangulation of Polygon Array, Dynamic Programming β–Έ
Medium #2808 - Minimum Seconds to Equalize a Circular Array Array, Hash Table β–Έ
Medium #3648 - Minimum Sensors to Cover Grid Math β–Έ
Medium #1824 - Minimum Sideway Jumps Array, Dynamic Programming, Greedy β–Έ
Medium #2875 - Minimum Size Subarray in Infinite Array Array, Hash Table, Sliding Window, Prefix Sum β–Έ
Medium #209 - Minimum Size Subarray Sum Array, Binary Search, Sliding Window, Prefix Sum β–Έ
Medium #1870 - Minimum Speed to Arrive on Time Array, Binary Search β–Έ
Medium #3746 - Minimum String Length After Balanced Removals String, Stack, Counting β–Έ
Medium #3795 - Minimum Subarray Length With Distinct Sum At Least K Array, Hash Table, Sliding Window β–Έ
Medium #3144 - Minimum Substring Partition of Equal Character Frequency Hash Table, String, Dynamic Programming, Counting β–Έ
Medium #1529 - Minimum Suffix Flips String, Greedy β–Έ
Medium #3654 - Minimum Sum After Divisible Sum Deletions Array, Hash Table, Dynamic Programming, Prefix Sum β–Έ
Medium #2909 - Minimum Sum of Mountain Triplets II Array β–Έ
Medium #2333 - Minimum Sum of Squared Difference Array, Binary Search, Greedy, Sorting, Heap (Priority Queue) β–Έ
Medium #1536 - Minimum Swaps to Arrange a Binary Grid Array, Greedy, Matrix β–Έ
Medium #2134 - Minimum Swaps to Group All 1's Together II Array, Sliding Window β–Έ
Medium #1247 - Minimum Swaps to Make Strings Equal Math, String, Greedy β–Έ
Medium #3551 - Minimum Swaps to Sort by Digit Sum Array, Hash Table, Sorting β–Έ
Medium MinimumTimeDifference β–Έ
Medium #3608 - Minimum Time for K Connected Components Binary Search, Union-Find, Graph Theory, Sorting β–Έ
Medium #3639 - Minimum Time to Activate String Array, Binary Search β–Έ
Medium #3376 - Minimum Time to Break Locks I Array, Dynamic Programming, Backtracking, Bit Manipulation, Depth-First Search, Bitmask β–Έ
Medium #1443 - Minimum Time to Collect All Apples in a Tree Hash Table, Tree, Depth-First Search, Breadth-First Search β–Έ
Medium #3733 - Minimum Time to Complete All Deliveries Math, Binary Search β–Έ
Medium #2187 - Minimum Time to Complete Trips Array, Binary Search β–Έ
Medium #1578 - Minimum Time to Make Rope Colorful Array, String, Dynamic Programming, Greedy β–Έ
Medium #3604 - Minimum Time to Reach Destination in Directed Graph Graph Theory, Heap (Priority Queue), Shortest Path β–Έ
Medium #2594 - Minimum Time to Repair Cars Array, Binary Search β–Έ
Medium #3029 - Minimum Time to Revert Word to Initial State I String, Rolling Hash, String Matching, Hash Function β–Έ
Medium #3112 - Minimum Time to Visit Disappearing Nodes Array, Graph Theory, Heap (Priority Queue), Shortest Path β–Έ
Medium #1959 - Minimum Total Space Wasted With K Resizing Operations Array, Dynamic Programming, Prefix Sum β–Έ
Medium #858 - Mirror Reflection Math, Geometry, Number Theory β–Έ
Medium MonotoneIncreasingDigits β–Έ
Medium #1193 - Monthly Transactions I Database β–Έ
Medium #2070 - Most Beautiful Item for Each Query Array, Binary Search, Sorting β–Έ
Medium #3092 - Most Frequent IDs Array, Hash Table, Heap (Priority Queue), Ordered Set β–Έ
Medium #3044 - Most Frequent Prime Array, Hash Table, Math, Matrix, Counting, Enumeration, Number Theory β–Έ
Medium MostFrequentSubtreeSum β–Έ
Medium #2456 - Most Popular Video Creator Array, Hash Table, String, Sorting, Heap (Priority Queue) β–Έ
Medium #826 - Most Profit Assigning Work Array, Two Pointers, Binary Search, Greedy, Sorting β–Έ
Medium #2467 - Most Profitable Path in a Tree Array, Tree, Depth-First Search, Breadth-First Search, Graph Theory β–Έ
Medium #947 - Most Stones Removed with Same Row or Column Hash Table, Depth-First Search, Union-Find, Graph Theory β–Έ
Medium #2337 - Move Pieces to Obtain a String Two Pointers, String β–Έ
Medium #2731 - Movement of Robots Array, Brainteaser, Sorting, Prefix Sum β–Έ
Medium #1341 - Movie Rating Database β–Έ
Medium #1033 - Moving Stones Until Consecutive Math, Brainteaser β–Έ
Medium #1040 - Moving Stones Until Consecutive II Array, Math, Sliding Window, Sorting β–Έ
Medium #43 - Multiply Strings Math, String, Simulation β–Έ
Medium MyCalendarI β–Έ
Medium MyCalendarIi β–Έ
Medium NAryTreeLevelOrderTraversal β–Έ
Medium #1926 - Nearest Exit from Entrance in Maze Array, Breadth-First Search, Matrix β–Έ
Medium #2683 - Neighboring Bitwise XOR Array, Bit Manipulation β–Έ
Medium #2649 - Nested Array Generator General β–Έ
Medium NetworkDelayTime β–Έ
Medium #837 - New 21 Game Math, Dynamic Programming, Sliding Window, Probability and Statistics β–Έ
Medium NextGreaterElementIi β–Έ
Medium NextGreaterElementIii β–Έ
Medium #1019 - Next Greater Node In Linked List Array, Linked List, Stack, Monotonic Stack β–Έ
Medium #2048 - Next Greater Numerically Balanced Number Hash Table, Math, Backtracking, Counting, Enumeration β–Έ
Medium #31 - Next Permutation Array, Two Pointers β–Έ
Medium #2374 - Node With Highest Edge Score Hash Table, Graph Theory β–Έ
Medium NonDecreasingArray β–Έ
Medium NonDecreasingSubsequences β–Έ
Medium NonOverlappingIntervals β–Έ
Medium #400 - Nth Digit Math, Binary Search β–Έ
Medium #2672 - Number of Adjacent Elements With the Same Color Array β–Έ
Medium #3811 - Number of Alternating XOR Partitions Array, Hash Table, Dynamic Programming, Bit Manipulation β–Έ
Medium #2768 - Number of Black Blocks Array, Hash Table, Enumeration β–Έ
Medium NumberOfBoomerangs β–Έ
Medium #1276 - Number of Burgers with No Waste of Ingredients Math β–Έ
Medium #3804 - Number of Centered Subarrays Array, Hash Table, Enumeration β–Έ
Medium #1254 - Number of Closed Islands Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix β–Έ
Medium #1155 - Number of Dice Rolls With Target Sum Dynamic Programming β–Έ
Medium #1020 - Number of Enclaves Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix β–Έ
Medium #1530 - Number of Good Leaf Nodes Pairs Tree, Depth-First Search, Binary Tree β–Έ
Medium #1525 - Number of Good Ways to Split a String Hash Table, String, Dynamic Programming, Bit Manipulation β–Έ
Medium #200 - Number of Islands Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix β–Έ
Medium #2125 - Number of Laser Beams in a Bank Array, Math, String, Matrix β–Έ
Medium NumberOfLongestIncreasingSubsequence β–Έ
Medium NumberOfMatchingSubsequences β–Έ
Medium #1519 - Number of Nodes in the Sub-Tree With the Same Label Hash Table, Tree, Depth-First Search, Breadth-First Search, Counting β–Έ
Medium #1319 - Number of Operations to Make Network Connected Depth-First Search, Breadth-First Search, Union-Find, Graph Theory β–Έ
Medium #1801 - Number of Orders in the Backlog Array, Heap (Priority Queue), Simulation β–Έ
Medium #2001 - Number of Pairs of Interchangeable Rectangles Array, Hash Table, Math, Counting, Number Theory β–Έ
Medium #2023 - Number of Pairs of Strings With Concatenation Equal to Target Array, Hash Table, String, Counting β–Έ
Medium #2327 - Number of People Aware of a Secret Dynamic Programming, Queue, Simulation β–Έ
Medium #3649 - Number of Perfect Pairs Array, Math, Two Pointers, Sorting β–Έ
Medium #3839 - Number of Prefix Connected Groups Array, Hash Table, String, Counting β–Έ
Medium NumberOfProvinces β–Έ
Medium #1786 - Number of Restricted Paths From First to Last Node Dynamic Programming, Graph Theory, Topological Sort, Heap (Priority Queue), Shortest Path β–Έ
Medium #1621 - Number of Sets of K Non-Overlapping Line Segments Math, Dynamic Programming, Combinatorics, Prefix Sum β–Έ
Medium #2110 - Number of Smooth Descent Periods of a Stock Array, Math, Two Pointers, Dynamic Programming, Sliding Window β–Έ
Medium #1404 - Number of Steps to Reduce a Number in Binary Representation to One String, Bit Manipulation, Simulation β–Έ
Medium #2930 - Number of Strings Which Can Be Rearranged to Contain Substring Math, Dynamic Programming, Combinatorics β–Έ
Medium #1343 - Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold Array, Sliding Window β–Έ
Medium #1524 - Number of Sub-arrays With Odd Sum Array, Math, Dynamic Programming, Prefix Sum β–Έ
Medium #3034 - Number of Subarrays That Match a Pattern I Array, Rolling Hash, String Matching, Hash Function β–Έ
Medium NumberOfSubarraysWithBoundedMaximum β–Έ
Medium #2447 - Number of Subarrays With GCD Equal to K Array, Math, Number Theory β–Έ
Medium #2470 - Number of Subarrays With LCM Equal to K Array, Math, Number Theory β–Έ
Medium #1498 - Number of Subsequences That Satisfy the Given Sum Condition Array, Two Pointers, Binary Search, Sorting β–Έ
Medium #1358 - Number of Substrings Containing All Three Characters Hash Table, String, Sliding Window β–Έ
Medium #1513 - Number of Substrings With Only 1s Math, String β–Έ
Medium #1375 - Number of Times Binary String Is Prefix-Aligned Array β–Έ
Medium #3513 - Number of Unique XOR Triplets I Array, Math, Bit Manipulation β–Έ
Medium #3514 - Number of Unique XOR Triplets II Array, Math, Bit Manipulation, Enumeration β–Έ
Medium #1976 - Number of Ways to Arrive at Destination Dynamic Programming, Graph Theory, Topological Sort, Shortest Path β–Έ
Medium #3558 - Number of Ways to Assign Edge Weights I Math, Tree, Depth-First Search β–Έ
Medium #2240 - Number of Ways to Buy Pens and Pencils Math, Enumeration β–Έ
Medium #2400 - Number of Ways to Reach a Position After Exactly k Steps Math, Dynamic Programming, Combinatorics β–Έ
Medium #2222 - Number of Ways to Select Buildings String, Dynamic Programming, Prefix Sum β–Έ
Medium #1573 - Number of Ways to Split a String Math, String β–Έ
Medium #2270 - Number of Ways to Split Array Array, Prefix Sum β–Έ
Medium #1577 - Number of Ways Where Square of Number Is Equal to Product of Two Numbers Array, Hash Table, Math, Two Pointers β–Έ
Medium #1915 - Number of Wonderful Substrings Hash Table, String, Bit Manipulation, Prefix Sum β–Έ
Medium #2348 - Number of Zero-Filled Subarrays Array, Math β–Έ
Medium #967 - Numbers With Same Consecutive Differences Backtracking, Breadth-First Search β–Έ
Medium #3220 - Odd and Even Transactions Database β–Έ
Medium #328 - Odd Even Linked List Linked List β–Έ
Medium OnesAndZeroes β–Έ
Medium #911 - Online Election Array, Hash Table, Binary Search, Design β–Έ
Medium #901 - Online Stock Span Stack, Design, Monotonic Stack, Data Stream β–Έ
Medium OpenTheLock β–Έ
Medium #1993 - Operations on Tree Array, Hash Table, Tree, Depth-First Search, Breadth-First Search, Design β–Έ
Medium OptimalDivision β–Έ
Medium #2405 - Optimal Partition of String Hash Table, String, Greedy β–Έ
Medium OutOfBoundaryPaths β–Έ
Medium P01Matrix β–Έ
Medium P132Pattern β–Έ
Medium P2KeysKeyboard β–Έ
Medium #923 - 3Sum With Multiplicity Array, Hash Table, Two Pointers, Sorting, Counting β–Έ
Medium P4sumIi β–Έ
Medium PacificAtlanticWaterFlow β–Έ
Medium #3429 - Paint House IV Array, Dynamic Programming β–Έ
Medium #1010 - Pairs of Songs With Total Durations Divisible by 60 Array, Hash Table, Counting β–Έ
Medium #131 - Palindrome Partitioning String, Dynamic Programming, Backtracking β–Έ
Medium PalindromicSubstrings β–Έ
Medium #969 - Pancake Sorting Array, Two Pointers, Greedy, Sorting β–Έ
Medium #2161 - Partition Array According to Given Pivot Array, Two Pointers, Simulation β–Έ
Medium #1043 - Partition Array for Maximum Sum Array, Dynamic Programming β–Έ
Medium #915 - Partition Array into Disjoint Intervals Array β–Έ
Medium #3659 - Partition Array Into K-Distinct Groups Array, Hash Table, Counting β–Έ
Medium #3566 - Partition Array into Two Equal Product Subsets Array, Bit Manipulation, Recursion, Enumeration β–Έ
Medium #2294 - Partition Array Such That Maximum Difference Is K Array, Greedy, Sorting β–Έ
Medium #3599 - Partition Array to Minimize XOR Array, Dynamic Programming, Bit Manipulation, Prefix Sum β–Έ
Medium PartitionEqualSubsetSum β–Έ
Medium PartitionLabels β–Έ
Medium #86 - Partition List Linked List, Two Pointers β–Έ
Medium #3597 - Partition String Hash Table, String, Trie, Simulation β–Έ
Medium #2767 - Partition String Into Minimum Beautiful Substrings Hash Table, String, Dynamic Programming, Backtracking β–Έ
Medium #2522 - Partition String Into Substrings With Values at Most K String, Dynamic Programming, Greedy β–Έ
Medium PartitionToKEqualSumSubsets β–Έ
Medium #1689 - Partitioning Into Minimum Number Of Deci-Binary Numbers String, Greedy β–Έ
Medium #3532 - Path Existence Queries in a Graph I Array, Hash Table, Binary Search, Union-Find, Graph Theory β–Έ
Medium #1104 - Path In Zigzag Labelled Binary Tree Math, Tree, Binary Tree β–Έ
Medium #113 - Path Sum II Backtracking, Tree, Depth-First Search, Binary Tree β–Έ
Medium PathSumIii β–Έ
Medium #1219 - Path with Maximum Gold Array, Backtracking, Matrix β–Έ
Medium #1514 - Path with Maximum Probability Array, Graph Theory, Heap (Priority Queue), Shortest Path β–Έ
Medium #1631 - Path With Minimum Effort Array, Binary Search, Depth-First Search, Breadth-First Search, Union-Find, Heap (Priority Queue), Matrix β–Έ
Medium #852 - Peak Index in a Mountain Array Array, Binary Search β–Έ
Medium #284 - Peeking Iterator Array, Design, Iterator β–Έ
Medium #1452 - People Whose List of Favorite Companies Is Not a Subset of Another List Array, Hash Table, String β–Έ
Medium #279 - Perfect Squares Math, Dynamic Programming, Breadth-First Search β–Έ
Medium PermutationInString β–Έ
Medium #46 - Permutations Array, Backtracking β–Έ
Medium #47 - Permutations II Array, Backtracking, Sorting β–Έ
Medium #2055 - Plates Between Candles Array, String, Binary Search, Prefix Sum β–Έ
Medium #116 - Populating Next Right Pointers in Each Node Linked List, Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Medium #117 - Populating Next Right Pointers in Each Node II Linked List, Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Medium #886 - Possible Bipartition Depth-First Search, Breadth-First Search, Union-Find, Graph Theory β–Έ
Medium #50 - Pow(x, n) Math, Recursion β–Έ
Medium #3607 - Power Grid Maintenance Array, Hash Table, Depth-First Search, Breadth-First Search, Union-Find, Graph Theory, Heap (Priority Queue), Ordered Set β–Έ
Medium #970 - Powerful Integers Hash Table, Math, Enumeration β–Έ
Medium PredictTheWinner β–Έ
Medium #1053 - Previous Permutation With One Swap Array, Greedy β–Έ
Medium #2761 - Prime Pairs With Target Sum Array, Math, Enumeration, Number Theory β–Έ
Medium #866 - Prime Palindrome Math, Number Theory β–Έ
Medium #2601 - Prime Subtraction Operation Array, Math, Binary Search, Greedy, Number Theory β–Έ
Medium PrintBinaryTree β–Έ
Medium #1115 - Print FooBar Alternately Concurrency β–Έ
Medium #1324 - Print Words Vertically Array, String, Simulation β–Έ
Medium #1116 - Print Zero Even Odd Concurrency β–Έ
Medium #957 - Prison Cells After N Days Array, Hash Table, Math, Bit Manipulation β–Έ
Medium #3612 - Process String with Special Operations I String, Simulation β–Έ
Medium #1882 - Process Tasks Using Servers Array, Heap (Priority Queue) β–Έ
Medium #238 - Product of Array Except Self Array, Prefix Sum β–Έ
Medium #1352 - Product of the Last K Numbers Array, Math, Design, Data Stream, Prefix Sum β–Έ
Medium #1164 - Product Price at a Given Date Database β–Έ
Medium #1070 - Product Sales Analysis III Database β–Έ
Medium #2637 - Promise Time Limit General β–Έ
Medium #3493 - Properties Graph Array, Hash Table, Depth-First Search, Breadth-First Search, Union-Find, Graph Theory β–Έ
Medium #1457 - Pseudo-Palindromic Paths in a Binary Tree Bit Manipulation, Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Medium #838 - Push Dominoes Two Pointers, String, Dynamic Programming β–Έ
Medium PyramidTransitionMatrix β–Έ
Medium #3820 - Pythagorean Distance Nodes in a Tree Tree, Breadth-First Search β–Έ
Medium #1222 - Queens That Can Attack the King Array, Matrix, Simulation β–Έ
Medium #1409 - Queries on a Permutation With Key Array, Binary Indexed Tree, Simulation β–Έ
Medium #1828 - Queries on Number of Points Inside a Circle Array, Math, Geometry β–Έ
Medium #2343 - Query Kth Smallest Trimmed Number Array, String, Divide and Conquer, Sorting, Heap (Priority Queue), Radix Sort, Quickselect β–Έ
Medium QueueReconstructionByHeight β–Έ
Medium RabbitsInForest β–Έ
Medium RandomFlipMatrix β–Έ
Medium #398 - Random Pick Index Hash Table, Math, Reservoir Sampling, Randomized β–Έ
Medium RandomPickWithWeight β–Έ
Medium RandomPointInNonOverlappingRectangles β–Έ
Medium #2080 - Range Frequency Queries Array, Hash Table, Binary Search, Design, Segment Tree β–Έ
Medium #2438 - Range Product Queries of Powers Array, Bit Manipulation, Prefix Sum β–Έ
Medium #1508 - Range Sum of Sorted Subarray Sums Array, Two Pointers, Binary Search, Sorting, Prefix Sum β–Έ
Medium #304 - Range Sum Query 2D - Immutable Array, Design, Matrix, Prefix Sum β–Έ
Medium #307 - Range Sum Query - Mutable Array, Divide and Conquer, Design, Binary Indexed Tree, Segment Tree β–Έ
Medium #1366 - Rank Teams by Votes Array, Hash Table, String, Sorting, Counting β–Έ
Medium ReachANumber β–Έ
Medium #3282 - Reach End of Array With Max Score Array, Greedy β–Έ
Medium #2368 - Reachable Nodes With Restrictions Array, Hash Table, Tree, Depth-First Search, Breadth-First Search, Union-Find, Graph Theory β–Έ
Medium #2149 - Rearrange Array Elements by Sign Array, Two Pointers, Simulation β–Έ
Medium #2587 - Rearrange Array to Maximize Prefix Score Array, Greedy, Sorting, Prefix Sum β–Έ
Medium #3365 - Rearrange K Substrings to Form Target String Hash Table, String, Sorting β–Έ
Medium #1451 - Rearrange Words in a Sentence String, Sorting β–Έ
Medium #1253 - Reconstruct a 2-Row Binary Matrix Array, Greedy, Matrix β–Έ
Medium ReconstructOriginalDigitsFromEnglish β–Έ
Medium #99 - Recover Binary Search Tree Tree, Depth-First Search, Binary Search Tree, Binary Tree β–Έ
Medium #223 - Rectangle Area Math, Geometry β–Έ
Medium #1338 - Reduce Array Size to The Half Array, Hash Table, Greedy, Sorting, Heap (Priority Queue) β–Έ
Medium #1887 - Reduction Operations to Make the Array Elements Equal Array, Sorting β–Έ
Medium RedundantConnection β–Έ
Medium #959 - Regions Cut By Slashes Array, Hash Table, Depth-First Search, Breadth-First Search, Union-Find, Matrix β–Έ
Medium #2766 - Relocate Marbles Array, Hash Table, Sorting, Simulation β–Έ
Medium #2957 - Remove Adjacent Almost-Equal Characters String, Dynamic Programming, Greedy β–Έ
Medium #1209 - Remove All Adjacent Duplicates in String II String, Stack β–Έ
Medium #1910 - Remove All Occurrences of a Substring String, Stack, Simulation β–Έ
Medium #2038 - Remove Colored Pieces if Both Neighbors are the Same Color Math, String, Greedy, Game Theory β–Έ
Medium RemoveComments β–Έ
Medium #1288 - Remove Covered Intervals Array, Sorting β–Έ
Medium #316 - Remove Duplicate Letters String, Stack, Greedy, Monotonic Stack β–Έ
Medium #80 - Remove Duplicates from Sorted Array II Array, Two Pointers β–Έ
Medium #82 - Remove Duplicates from Sorted List II Linked List, Two Pointers β–Έ
Medium #3703 - Remove K-Balanced Substrings String, Stack, Simulation β–Έ
Medium RemoveKDigits β–Έ
Medium #3310 - Remove Methods From Project Depth-First Search, Breadth-First Search, Graph Theory β–Έ
Medium #2487 - Remove Nodes From Linked List Linked List, Stack, Recursion, Monotonic Stack β–Έ
Medium #19 - Remove Nth Node From End of List Linked List, Two Pointers β–Έ
Medium #1962 - Remove Stones to Minimize the Total Array, Greedy, Heap (Priority Queue) β–Έ
Medium #1233 - Remove Sub-Folders from the Filesystem Array, String, Depth-First Search, Trie β–Έ
Medium #1171 - Remove Zero Sum Consecutive Nodes from Linked List Hash Table, Linked List β–Έ
Medium #2091 - Removing Minimum and Maximum From Array Array, Greedy β–Έ
Medium #2171 - Removing Minimum Number of Magic Beans Array, Greedy, Sorting, Enumeration, Prefix Sum β–Έ
Medium #2390 - Removing Stars From a String String, Stack, Simulation β–Έ
Medium #937 - Reorder Data in Log Files Array, String, Sorting β–Έ
Medium #143 - Reorder List Linked List, Two Pointers, Stack, Recursion β–Έ
Medium #1466 - Reorder Routes to Make All Paths Lead to the City Zero Depth-First Search, Breadth-First Search, Graph Theory β–Έ
Medium #869 - Reordered Power of 2 Hash Table, Math, Sorting, Counting, Enumeration β–Έ
Medium ReorganizeString β–Έ
Medium #187 - Repeated DNA Sequences Hash Table, String, Bit Manipulation, Sliding Window, Rolling Hash, Hash Function β–Έ
Medium RepeatedStringMatch β–Έ
Medium #2295 - Replace Elements in an Array Array, Hash Table, Simulation β–Έ
Medium #3081 - Replace Question Marks in String to Minimize Its Value Hash Table, String, Greedy, Sorting, Heap (Priority Queue), Counting β–Έ
Medium #1234 - Replace the Substring for Balanced String String, Sliding Window β–Έ
Medium ReplaceWords β–Έ
Medium #3295 - Report Spam Message Array, Hash Table, String β–Έ
Medium #3439 - Reschedule Meetings for Maximum Free Time I Array, Greedy, Sliding Window β–Έ
Medium #3440 - Reschedule Meetings for Maximum Free Time II Array, Greedy, Enumeration β–Έ
Medium #1321 - Restaurant Growth Database β–Έ
Medium #93 - Restore IP Addresses String, Backtracking β–Έ
Medium #1743 - Restore the Array From Adjacent Pairs Array, Hash Table, Depth-First Search β–Έ
Medium #3561 - Resulting String After Adjacent Removals String, Stack, Simulation β–Έ
Medium #950 - Reveal Cards In Increasing Order Array, Queue, Sorting, Simulation β–Έ
Medium #7 - Reverse Integer Math β–Έ
Medium #92 - Reverse Linked List II Linked List β–Έ
Medium #2074 - Reverse Nodes in Even Length Groups Linked List β–Έ
Medium #2415 - Reverse Odd Levels of Binary Tree Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Medium #1190 - Reverse Substrings Between Each Pair of Parentheses String, Stack β–Έ
Medium #151 - Reverse Words in a String Two Pointers, String β–Έ
Medium #3775 - Reverse Words With Same Vowel Count Two Pointers, String, Simulation β–Έ
Medium #2512 - Reward Top K Students Array, Hash Table, String, Sorting, Heap (Priority Queue) β–Έ
Medium #3128 - Right Triangles Array, Hash Table, Math, Combinatorics, Counting β–Έ
Medium #900 - RLE Iterator Array, Design, Counting, Iterator β–Έ
Medium #1041 - Robot Bounded In Circle Math, String, Simulation β–Έ
Medium #189 - Rotate Array Array, Math, Two Pointers β–Έ
Medium #396 - Rotate Function Array, Math, Dynamic Programming β–Έ
Medium #48 - Rotate Image Array, Math, Matrix β–Έ
Medium #61 - Rotate List Linked List, Two Pointers β–Έ
Medium #3819 - Rotate Non Negative Elements Array, Simulation β–Έ
Medium RotatedDigits β–Έ
Medium #1861 - Rotating the Box Array, Two Pointers, Matrix β–Έ
Medium #994 - Rotting Oranges Array, Breadth-First Search, Matrix β–Έ
Medium #990 - Satisfiability of Equality Equations Array, String, Union-Find, Graph Theory β–Έ
Medium #861 - Score After Flipping Matrix Array, Greedy, Bit Manipulation, Matrix β–Έ
Medium #856 - Score of Parentheses String, Stack β–Έ
Medium #74 - Search a 2D Matrix Array, Binary Search, Matrix β–Έ
Medium #240 - Search a 2D Matrix II Array, Binary Search, Divide and Conquer, Matrix β–Έ
Medium #33 - Search in Rotated Sorted Array Array, Binary Search β–Έ
Medium #81 - Search in Rotated Sorted Array II Array, Binary Search β–Έ
Medium #1268 - Search Suggestions System Array, String, Binary Search, Trie, Sorting, Heap (Priority Queue) β–Έ
Medium #3564 - Seasonal Sales Analysis Database β–Έ
Medium #1845 - Seat Reservation Manager Design, Heap (Priority Queue) β–Έ
Medium #3458 - Select K Disjoint Special Substrings Hash Table, String, Dynamic Programming, Greedy, Sorting β–Έ
Medium #1648 - Sell Diminishing-Valued Colored Balls Array, Math, Binary Search, Greedy, Sorting, Heap (Priority Queue) β–Έ
Medium #2284 - Sender With Largest Word Count Array, Hash Table, String, Counting β–Έ
Medium #1813 - Sentence Similarity III Array, Two Pointers, String β–Έ
Medium #2938 - Separate Black and White Balls Two Pointers, String, Greedy β–Έ
Medium #3453 - Separate Squares I Array, Binary Search β–Έ
Medium #1291 - Sequential Digits Enumeration β–Έ
Medium SerializeAndDeserializeBst β–Έ
Medium #73 - Set Matrix Zeroes Array, Hash Table, Matrix β–Έ
Medium #3361 - Shift Distance Between Two Strings Array, String, Prefix Sum β–Έ
Medium #848 - Shifting Letters Array, String, Prefix Sum β–Έ
Medium #2381 - Shifting Letters II Array, String, Prefix Sum β–Έ
Medium ShoppingOffers β–Έ
Medium #820 - Short Encoding of Words Array, Hash Table, String, Trie β–Έ
Medium #2904 - Shortest and Lexicographically Smallest Beautiful String String, Sliding Window β–Έ
Medium #934 - Shortest Bridge Array, Depth-First Search, Breadth-First Search, Matrix β–Έ
Medium #3243 - Shortest Distance After Road Addition Queries I Array, Breadth-First Search, Graph Theory β–Έ
Medium #1091 - Shortest Path in Binary Matrix Array, Breadth-First Search, Matrix β–Έ
Medium #1129 - Shortest Path with Alternating Colors Breadth-First Search, Graph Theory β–Έ
Medium #2800 - Shortest String That Contains Three Strings String, Greedy, Enumeration β–Έ
Medium #1574 - Shortest Subarray to be Removed to Make Array Sorted Array, Two Pointers, Binary Search, Stack, Monotonic Stack β–Έ
Medium #3097 - Shortest Subarray With OR at Least K II Array, Bit Manipulation, Sliding Window β–Έ
Medium #3076 - Shortest Uncommon Substring in an Array Array, Hash Table, String, Trie β–Έ
Medium ShortestUnsortedContinuousSubarray β–Έ
Medium #384 - Shuffle an Array Array, Math, Design, Randomized β–Έ
Medium #2043 - Simple Bank System Array, Hash Table, Design, Simulation β–Έ
Medium #1447 - Simplified Fractions Math, String, Number Theory β–Έ
Medium #71 - Simplify Path String, Stack β–Έ
Medium SingleElementInASortedArray β–Έ
Medium #137 - Single Number II Array, Bit Manipulation β–Έ
Medium #260 - Single Number III Array, Bit Manipulation β–Έ
Medium #1834 - Single-Threaded CPU Array, Sorting, Heap (Priority Queue) β–Έ
Medium #2653 - Sliding Subarray Beauty Array, Hash Table, Sliding Window β–Έ
Medium #3790 - Smallest All-Ones Multiple Hash Table, Math β–Έ
Medium #1015 - Smallest Integer Divisible by K Hash Table, Math β–Έ
Medium #2598 - Smallest Missing Non-negative Integer After Operations Array, Hash Table, Math, Greedy β–Έ
Medium #2336 - Smallest Number in Infinite Set Hash Table, Design, Heap (Priority Queue), Ordered Set β–Έ
Medium #3517 - Smallest Palindromic Rearrangement I String, Sorting, Counting Sort β–Έ
Medium #910 - Smallest Range II Array, Math, Greedy, Sorting β–Έ
Medium #988 - Smallest String Starting From Leaf String, Backtracking, Tree, Depth-First Search, Binary Tree β–Έ
Medium #1663 - Smallest String With A Given Numeric Value String, Greedy β–Έ
Medium #1202 - Smallest String With Swaps Array, Hash Table, String, Depth-First Search, Breadth-First Search, Union-Find, Sorting β–Έ
Medium #2411 - Smallest Subarrays With Maximum Bitwise OR Array, Binary Search, Bit Manipulation, Sliding Window β–Έ
Medium #1081 - Smallest Subsequence of Distinct Characters String, Stack, Greedy, Monotonic Stack β–Έ
Medium #865 - Smallest Subtree with all the Deepest Nodes Hash Table, Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Medium #2507 - Smallest Value After Replacing With Sum of Prime Factors Math, Simulation, Number Theory β–Έ
Medium #2165 - Smallest Value of the Rearranged Number Math, Sorting β–Έ
Medium #2624 - Snail Traversal General β–Έ
Medium #909 - Snakes and Ladders Array, Breadth-First Search, Matrix β–Έ
Medium #1146 - Snapshot Array Array, Hash Table, Binary Search, Design β–Έ
Medium SolveTheEquation β–Έ
Medium #2140 - Solving Questions With Brainpower Array, Dynamic Programming β–Έ
Medium #912 - Sort an Array Array, Divide and Conquer, Sorting, Heap (Priority Queue), Merge Sort, Bucket Sort, Radix Sort, Counting Sort β–Έ
Medium SortCharactersByFrequency β–Έ
Medium #75 - Sort Colors Array, Two Pointers, Sorting β–Έ
Medium #1387 - Sort Integers by The Power Value Dynamic Programming, Memoization, Sorting β–Έ
Medium #148 - Sort List Linked List, Two Pointers, Divide and Conquer, Sorting, Merge Sort β–Έ
Medium #3446 - Sort Matrix by Diagonals Array, Sorting, Matrix β–Έ
Medium #2191 - Sort the Jumbled Numbers Array, Sorting β–Έ
Medium #1329 - Sort the Matrix Diagonally Array, Sorting, Matrix β–Έ
Medium #2545 - Sort the Students by Their Kth Score Array, Sorting, Matrix β–Έ
Medium #2785 - Sort Vowels in a String String, Sorting β–Έ
Medium #2826 - Sorting Three Groups Array, Binary Search, Dynamic Programming β–Έ
Medium #808 - Soup Servings Math, Dynamic Programming, Probability and Statistics β–Έ
Medium #3152 - Special Array II Array, Binary Search, Prefix Sum β–Έ
Medium #2741 - Special Permutations Array, Dynamic Programming, Bit Manipulation, Bitmask β–Έ
Medium #54 - Spiral Matrix Array, Matrix, Simulation β–Έ
Medium #59 - Spiral Matrix II Array, Matrix, Simulation β–Έ
Medium #885 - Spiral Matrix III Array, Matrix, Simulation β–Έ
Medium #2326 - Spiral Matrix IV Array, Linked List, Matrix, Simulation β–Έ
Medium #1593 - Split a String Into the Max Number of Unique Substrings Hash Table, String, Backtracking β–Έ
Medium #3690 - Split and Merge Array Transformation Array, Hash Table, Breadth-First Search β–Έ
Medium #3618 - Split Array by Prime Indices Array, Math, Number Theory β–Έ
Medium SplitArrayIntoConsecutiveSubsequences β–Έ
Medium #842 - Split Array into Fibonacci Sequence String, Backtracking β–Έ
Medium #2871 - Split Array Into Maximum Number of Subarrays Array, Greedy, Bit Manipulation β–Έ
Medium #3698 - Split Array With Minimum Difference Array, Prefix Sum β–Έ
Medium SplitLinkedListInParts β–Έ
Medium #1616 - Split Two Strings to Make Palindrome Two Pointers, String β–Έ
Medium #1849 - Splitting a String Into Descending Consecutive Values String, Backtracking, Enumeration β–Έ
Medium #3728 - Stable Subarrays With Equal Boundary and Interior Sum Array, Hash Table, Prefix Sum β–Έ
Medium #1093 - Statistics from a Large Sample Array, Math, Probability and Statistics β–Έ
Medium #2096 - Step-By-Step Directions From a Binary Tree Node to Another String, Tree, Depth-First Search, Binary Tree β–Έ
Medium #2289 - Steps to Make Array Non-decreasing Array, Linked List, Dynamic Programming, Stack, Monotonic Stack, Simulation β–Έ
Medium #2034 - Stock Price Fluctuation Hash Table, Design, Heap (Priority Queue), Data Stream, Ordered Set β–Έ
Medium #877 - Stone Game Array, Math, Dynamic Programming, Game Theory β–Έ
Medium #1140 - Stone Game II Array, Math, Dynamic Programming, Prefix Sum, Game Theory β–Έ
Medium #2029 - Stone Game IX Array, Math, Greedy, Counting, Game Theory β–Έ
Medium #1686 - Stone Game VI Array, Math, Greedy, Sorting, Heap (Priority Queue), Game Theory β–Έ
Medium #1690 - Stone Game VII Array, Math, Dynamic Programming, Game Theory β–Έ
Medium #2396 - Strictly Palindromic Number Math, Two Pointers, Brainteaser β–Έ
Medium StringCompression β–Έ
Medium #3163 - String Compression III String β–Έ
Medium #8 - String to Integer (atoi) String β–Έ
Medium #984 - String Without AAA or BBB String, Greedy β–Έ
Medium SubarrayProductLessThanK β–Έ
Medium SubarraySumEqualsK β–Έ
Medium #974 - Subarray Sums Divisible by K Array, Hash Table, Prefix Sum β–Έ
Medium #811 - Subdomain Visit Count Array, Hash Table, String, Counting β–Έ
Medium #1476 - Subrectangle Queries Array, Design, Matrix β–Έ
Medium #3685 - Subsequence Sum After Capping Elements Array, Two Pointers, Dynamic Programming, Sorting β–Έ
Medium #78 - Subsets Array, Backtracking, Bit Manipulation β–Έ
Medium #90 - Subsets II Array, Backtracking, Bit Manipulation β–Έ
Medium #2564 - Substring XOR Queries Array, Hash Table, String, Bit Manipulation β–Έ
Medium #2300 - Successful Pairs of Spells and Potions Array, Two Pointers, Binary Search, Sorting β–Έ
Medium #16 - Sum3 Closest Array, Two Pointers, Sorting β–Έ
Medium #18 - Sum4 Array, Two Pointers, Sorting β–Έ
Medium #1927 - Sum Game Math, String, Greedy, Game Theory β–Έ
Medium #2679 - Sum in a Matrix Array, Sorting, Heap (Priority Queue), Matrix, Simulation β–Έ
Medium #15 - SumOf3 Array, Two Pointers, Sorting β–Έ
Medium #1685 - Sum of Absolute Differences in a Sorted Array Array, Math, Prefix Sum β–Έ
Medium #2012 - Sum of Beauty in the Array Array β–Έ
Medium #1781 - Sum of Beauty of All Substrings Hash Table, String, Counting β–Έ
Medium #3153 - Sum of Digit Differences of All Pairs Array, Hash Table, Math, Counting β–Έ
Medium #2615 - Sum of Distances Array, Hash Table, Prefix Sum β–Έ
Medium #985 - Sum of Even Numbers After Queries Array, Simulation β–Έ
Medium #3473 - Sum of K Subarrays With Length at Least M Array, Dynamic Programming, Prefix Sum β–Έ
Medium #3556 - Sum of Largest Prime Substrings Hash Table, Math, String, Sorting, Number Theory β–Έ
Medium #2718 - Sum of Matrix After Queries Array, Hash Table β–Έ
Medium #1300 - Sum of Mutated Array Closest to Target Array, Binary Search, Sorting β–Έ
Medium #1315 - Sum of Nodes with Even-Valued Grandparent Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Medium #2443 - Sum of Number and Its Reverse Math, Enumeration β–Έ
Medium #2310 - Sum of Numbers With Units Digit K Math, Dynamic Programming, Greedy, Enumeration β–Έ
Medium SumOfSquareNumbers β–Έ
Medium #907 - Sum of Subarray Minimums Array, Dynamic Programming, Stack, Monotonic Stack β–Έ
Medium #2104 - Sum of Subarray Ranges Array, Stack, Monotonic Stack β–Έ
Medium #371 - Sum of Two Integers Math, Bit Manipulation β–Έ
Medium #129 - Sum Root to Leaf Numbers Tree, Depth-First Search, Binary Tree β–Έ
Medium #372 - Super Pow Math, Divide and Conquer β–Έ
Medium #313 - Super Ugly Number Array, Math, Dynamic Programming β–Έ
Medium #130 - Surrounded Regions Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix β–Έ
Medium SwapAdjacentInLrString β–Έ
Medium #1156 - Swap For Longest Repeated Character Substring Hash Table, String, Sliding Window β–Έ
Medium #24 - Swap Nodes in Pairs Linked List, Recursion β–Έ
Medium #1721 - Swapping Nodes in a Linked List Linked List, Two Pointers β–Έ
Medium #2516 - Take K of Each Character From Left and Right Hash Table, String, Sliding Window β–Έ
Medium #3147 - Taking Maximum Energy From the Mystic Dungeon Array, Dynamic Programming, Prefix Sum β–Έ
Medium TargetSum β–Έ
Medium TaskScheduler β–Έ
Medium #2365 - Task Scheduler II Array, Hash Table, Simulation β–Έ
Medium #1226 - The Dining Philosophers Concurrency β–Έ
Medium #1471 - The k Strongest Values in an Array Array, Two Pointers, Sorting β–Έ
Medium #1415 - The k-th Lexicographical String of All Happy Strings of Length n String, Backtracking β–Έ
Medium #1492 - The kth Factor of n Math, Number Theory β–Έ
Medium #2332 - The Latest Time to Catch a Bus Array, Two Pointers, Binary Search, Sorting β–Έ
Medium #2597 - The Number of Beautiful Subsets Array, Hash Table, Math, Dynamic Programming, Backtracking, Sorting, Combinatorics β–Έ
Medium #1904 - The Number of Full Rounds You Have Played Math, String β–Έ
Medium #1942 - The Number of the Smallest Unoccupied Chair Array, Hash Table, Heap (Priority Queue) β–Έ
Medium #1996 - The Number of Weak Characters in the Game Array, Stack, Greedy, Sorting, Monotonic Stack β–Έ
Medium #2039 - The Time When the Network Becomes Idle Array, Breadth-First Search, Graph Theory β–Έ
Medium #1600 - Throne Inheritance Hash Table, Tree, Depth-First Search, Design β–Έ
Medium #981 - Time Based Key-Value Store Hash Table, String, Binary Search, Design β–Έ
Medium #1376 - Time Needed to Inform All Employees Tree, Depth-First Search, Breadth-First Search β–Έ
Medium #2380 - Time Needed to Rearrange a Binary String String, Dynamic Programming, Simulation β–Έ
Medium #347 - Top K Frequent Elements Array, Hash Table, Divide and Conquer, Sorting, Heap (Priority Queue), Bucket Sort, Counting, Quickselect β–Έ
Medium TopKFrequentWords β–Έ
Medium #3335 - Total Characters in String After Transformations I Hash Table, Math, String, Dynamic Programming, Counting β–Έ
Medium #2462 - Total Cost to Hire K Workers Array, Two Pointers, Heap (Priority Queue), Simulation β–Έ
Medium TotalHammingDistance β–Έ
Medium #3771 - Total Score of Dungeon Runs Array, Binary Search, Prefix Sum β–Έ
Medium #3751 - Total Waviness of Numbers in Range I Math, Dynamic Programming, Enumeration β–Έ
Medium #3576 - Transform Array to All Equal Elements Array, Greedy β–Έ
Medium #120 - Triangle Array, Dynamic Programming β–Έ
Medium TrimABinarySearchTree β–Έ
Medium #1726 - Tuple with Same Product Array, Hash Table, Counting β–Έ
Medium #1348 - Tweet Counts Per Frequency Hash Table, String, Binary Search, Design, Sorting, Ordered Set β–Έ
Medium #3665 - Twisted Mirror Path Count Array, Dynamic Programming, Matrix β–Έ
Medium #2054 - Two Best Non-Overlapping Events Array, Binary Search, Dynamic Programming, Sorting, Heap (Priority Queue) β–Έ
Medium #1029 - Two City Scheduling Array, Greedy, Sorting β–Έ
Medium #3664 - Two-Letter Card Game Array, Hash Table, String, Counting, Enumeration β–Έ
Medium #167 - Two Sum II - Input Array Is Sorted Array, Two Pointers, Binary Search β–Έ
Medium #264 - Ugly Number II Hash Table, Math, Dynamic Programming, Heap (Priority Queue) β–Έ
Medium #1201 - Ugly Number III Math, Binary Search, Combinatorics, Number Theory β–Έ
Medium #1035 - Uncrossed Lines Array, Dynamic Programming β–Έ
Medium #96 - Unique Binary Search Trees Math, Dynamic Programming, Tree, Binary Search Tree, Binary Tree β–Έ
Medium #95 - Unique Binary Search Trees II Dynamic Programming, Backtracking, Tree, Binary Search Tree, Binary Tree β–Έ
Medium #1930 - Unique Length-3 Palindromic Subsequences Hash Table, String, Bit Manipulation, Prefix Sum β–Έ
Medium #62 - Unique Paths Math, Dynamic Programming, Combinatorics β–Έ
Medium #63 - Unique Paths II Array, Dynamic Programming, Matrix β–Έ
Medium UniqueSubstringsInWraparoundString β–Έ
Medium #3528 - Unit Conversion I Depth-First Search, Breadth-First Search, Graph Theory β–Έ
Medium #2434 - Using a Robot to Print the Lexicographically Smallest String Hash Table, String, Stack, Greedy β–Έ
Medium #393 - UTF-8 Validation Array, Bit Manipulation β–Έ
Medium ValidParenthesisString β–Έ
Medium ValidSquare β–Έ
Medium #36 - Valid Sudoku Array, Hash Table, Matrix β–Έ
Medium ValidTicTacToeState β–Έ
Medium ValidTriangleNumber β–Έ
Medium #98 - Validate Binary Search Tree Tree, Depth-First Search, Binary Search Tree, Binary Tree β–Έ
Medium #1361 - Validate Binary Tree Nodes Tree, Depth-First Search, Breadth-First Search, Union-Find, Graph Theory, Binary Tree β–Έ
Medium ValidateIpAddress β–Έ
Medium #946 - Validate Stack Sequences Array, Stack, Simulation β–Έ
Medium #331 - Verify Preorder Serialization of a Binary Tree String, Stack, Tree, Binary Tree β–Έ
Medium #1024 - Video Stitching Array, Dynamic Programming, Greedy β–Έ
Medium #2786 - Visit Array Positions to Maximize Score Array, Dynamic Programming β–Έ
Medium #966 - Vowel Spellchecker Array, Hash Table, String β–Έ
Medium #3227 - Vowels Game in a String Math, String, Brainteaser, Game Theory β–Έ
Medium #2063 - Vowels of All Substrings Math, String, Dynamic Programming, Combinatorics β–Έ
Medium #874 - Walking Robot Simulation Array, Hash Table, Simulation β–Έ
Medium #2069 - Walking Robot Simulation II Design, Simulation β–Έ
Medium #365 - Water and Jug Problem Math, Depth-First Search, Breadth-First Search β–Έ
Medium #3100 - Water Bottles II Math, Simulation β–Έ
Medium #2079 - Watering Plants Array, Simulation β–Έ
Medium #2105 - Watering Plants II Array, Two Pointers, Simulation β–Έ
Medium #2787 - Ways to Express an Integer as Sum of Powers Dynamic Programming β–Έ
Medium #1664 - Ways to Make a Fair Array Array, Prefix Sum β–Έ
Medium #2750 - Ways to Split Array Into Good Subarrays Array, Math, Dynamic Programming β–Έ
Medium #1712 - Ways to Split Array Into Three Subarrays Array, Two Pointers, Binary Search, Prefix Sum β–Έ
Medium #1706 - Where Will the Ball Fall Array, Matrix, Simulation β–Έ
Medium #324 - Wiggle Sort II Array, Divide and Conquer, Greedy, Sorting, Quickselect β–Έ
Medium #376 - Wiggle Subsequence Array, Dynamic Programming, Greedy β–Έ
Medium #139 - Word Break Array, Hash Table, String, Dynamic Programming, Trie, Memoization β–Έ
Medium #79 - Word Search Array, String, Backtracking, Depth-First Search, Matrix β–Έ
Medium #3799 - Word Squares II Array, String, Backtracking, Sorting, Enumeration β–Έ
Medium #916 - Word Subsets Array, Hash Table, String β–Έ
Medium #2452 - Words Within Two Edits of Dictionary Array, String, Trie β–Έ
Medium #3653 - XOR After Range Multiplication Queries I Array, Divide and Conquer, Simulation β–Έ
Medium #1310 - XOR Queries of a Subarray Array, Bit Manipulation, Prefix Sum β–Έ
Medium #3355 - Zero Array Transformation I Array, Prefix Sum β–Έ
Medium #3356 - Zero Array Transformation II Array, Binary Search, Prefix Sum β–Έ
Medium #3362 - Zero Array Transformation III Array, Greedy, Sorting, Heap (Priority Queue), Prefix Sum β–Έ
Medium #3489 - Zero Array Transformation IV Array, Dynamic Programming β–Έ
Medium #6 - Zigzag Conversion String β–Έ
Hard #2117 - Abbreviating the Product of a Range Math, Number Theory β–Έ
Hard #2508 - Add Edges to Make Degrees of All Nodes Even Hash Table, Graph Theory β–Έ
Hard AllOoneDataStructure β–Έ
Hard #1478 - Allocate Mailboxes Array, Math, Dynamic Programming, Sorting β–Έ
Hard #3245 - Alternating Groups III Array, Binary Indexed Tree, Ordered Set β–Έ
Hard #3482 - Analyze Organization Hierarchy Database β–Έ
Hard #2897 - Apply Operations on Array to Maximize Sum of Squares Array, Hash Table, Greedy, Bit Manipulation β–Έ
Hard #2968 - Apply Operations to Maximize Frequency Score Array, Binary Search, Sliding Window, Sorting, Prefix Sum β–Έ
Hard #2818 - Apply Operations to Maximize Score Array, Math, Stack, Greedy, Sorting, Monotonic Stack, Number Theory β–Έ
Hard ArithmeticSlicesIiSubsequence β–Έ
Hard #224 - Basic Calculator Math, String, Stack, Recursion β–Έ
Hard BasicCalculatorIv β–Έ
Hard #1515 - Best Position for a Service Centre Array, Math, Geometry, Randomized β–Έ
Hard #123 - Best Time to Buy and Sell Stock III Array, Dynamic Programming β–Έ
Hard #188 - Best Time to Buy and Sell Stock IV Array, Dynamic Programming β–Έ
Hard #968 - Binary Tree Cameras Dynamic Programming, Tree, Depth-First Search, Binary Tree β–Έ
Hard #124 - Binary Tree Maximum Path Sum Dynamic Programming, Tree, Depth-First Search, Binary Tree β–Έ
Hard #3161 - Block Placement Queries Array, Binary Search, Binary Indexed Tree, Segment Tree β–Έ
Hard #2286 - Booking Concert Tickets in Groups Binary Search, Design, Binary Indexed Tree, Segment Tree β–Έ
Hard #1096 - Brace Expansion II Hash Table, String, Backtracking, Stack, Breadth-First Search, Sorting β–Έ
Hard #803 - Bricks Falling When Hit Array, Union-Find, Matrix β–Έ
Hard #2392 - Build a Matrix With Conditions Array, Graph Theory, Topological Sort, Matrix β–Έ
Hard #1420 - Build Array Where You Can Find The Maximum Exactly K Comparisons Dynamic Programming, Prefix Sum β–Έ
Hard #1739 - Building Boxes Math, Binary Search, Greedy β–Έ
Hard #312 - Burst Balloons Array, Dynamic Programming β–Έ
Hard #815 - Bus Routes Array, Hash Table, Breadth-First Search β–Έ
Hard #135 - Candy Array, Greedy β–Έ
Hard #1776 - Car Fleet II Array, Math, Stack, Heap (Priority Queue), Monotonic Stack β–Έ
Hard #913 - Cat and Mouse Math, Dynamic Programming, Graph Theory, Topological Sort, Memoization, Game Theory β–Έ
Hard #1728 - Cat and Mouse II Array, Math, Dynamic Programming, Graph Theory, Topological Sort, Memoization, Matrix, Game Theory β–Έ
Hard #810 - Chalkboard XOR Game Array, Math, Bit Manipulation, Brainteaser, Game Theory β–Έ
Hard #2060 - Check if an Original String Exists Given Two Encoded Strings String, Dynamic Programming β–Έ
Hard #3327 - Check if DFS Strings Are Palindromes Array, Hash Table, String, Tree, Depth-First Search, Hash Function β–Έ
Hard #3463 - Check If Digits Are Equal in String After Operations II Math, String, Combinatorics, Number Theory β–Έ
Hard #1250 - Check If It Is a Good Array Array, Math, Number Theory β–Έ
Hard #2543 - Check if Point Is Reachable Math, Number Theory β–Έ
Hard #1585 - Check If String Is Transformable With Substring Sort Operations String, Greedy, Sorting β–Έ
Hard #3235 - Check if the Rectangle Corner Is Reachable Array, Math, Depth-First Search, Breadth-First Search, Union-Find, Geometry β–Έ
Hard #2267 - Check if There Is a Valid Parentheses String Path Array, Dynamic Programming, Matrix β–Έ
Hard #1697 - Checking Existence of Edge Length Limited Paths Array, Two Pointers, Union-Find, Graph Theory, Sorting β–Έ
Hard CherryPickup β–Έ
Hard #1463 - Cherry Pickup II Array, Dynamic Programming, Matrix β–Έ
Hard #1847 - Closest Room Array, Binary Search, Sorting, Ordered Set β–Έ
Hard #1755 - Closest Subsequence Sum Array, Two Pointers, Dynamic Programming, Bit Manipulation, Sorting, Bitmask β–Έ
Hard #2603 - Collect Coins in a Tree Array, Tree, Graph Theory, Topological Sort β–Έ
Hard #3533 - Concatenated Divisibility Array, Dynamic Programming, Bit Manipulation, Bitmask β–Έ
Hard ConcatenatedWords β–Έ
Hard #829 - Consecutive Numbers Sum Math, Enumeration β–Έ
Hard #1425 - Constrained Subsequence Sum Array, Dynamic Programming, Queue, Sliding Window, Heap (Priority Queue), Monotonic Queue β–Έ
Hard #3311 - Construct 2D Grid Matching Graph Layout Array, Hash Table, Graph Theory, Matrix β–Έ
Hard #3213 - Construct String with Minimum Cost Array, String, Dynamic Programming, Suffix Array β–Έ
Hard #1354 - Construct Target Array With Multiple Sums Array, Heap (Priority Queue) β–Έ
Hard ContainVirus β–Έ
Hard #220 - Contains Duplicate III Array, Sliding Window, Sorting, Bucket Sort, Ordered Set β–Έ
Hard #1575 - Count All Possible Routes Array, Dynamic Programming, Memoization β–Έ
Hard #1359 - Count All Valid Pickup and Delivery Options Math, Dynamic Programming, Combinatorics β–Έ
Hard #3267 - Count Almost Equal Pairs II Array, Hash Table, Sorting, Counting, Enumeration β–Έ
Hard #2514 - Count Anagrams Hash Table, Math, String, Combinatorics, Counting β–Έ
Hard #2183 - Count Array Pairs Divisible by K Array, Hash Table, Math, Counting, Number Theory β–Έ
Hard #3490 - Count Beautiful Numbers Dynamic Programming β–Έ
Hard #2949 - Count Beautiful Substrings II Hash Table, Math, String, Number Theory, Prefix Sum β–Έ
Hard #3677 - Count Binary Palindromic Numbers Math, Bit Manipulation β–Έ
Hard #2953 - Count Complete Substrings Hash Table, String, Sliding Window β–Έ
Hard #3378 - Count Connected Components in LCM Graph Array, Hash Table, Math, Union-Find, Number Theory β–Έ
Hard LeetCode #730 – Count Different Palindromic Subsequences String, Dynamic Programming β–Έ
Hard #3729 - Count Distinct Subarrays Divisible by K in Sorted Array Array, Hash Table, Prefix Sum β–Έ
Hard #2088 - Count Fertile Pyramids in a Land Array, Dynamic Programming, Matrix β–Έ
Hard #2179 - Count Good Triplets in an Array Array, Binary Search, Divide and Conquer, Binary Indexed Tree, Segment Tree, Merge Sort, Ordered Set β–Έ
Hard #2552 - Count Increasing Quadruplets Array, Dynamic Programming, Binary Indexed Tree, Enumeration, Prefix Sum β–Έ
Hard #2276 - Count Integers in Intervals Design, Segment Tree, Ordered Set β–Έ
Hard #3352 - Count K-Reducible Numbers Less Than N Math, String, Dynamic Programming, Combinatorics β–Έ
Hard #2842 - Count K-Subsequences of a String With Maximum Beauty Hash Table, Math, String, Greedy, Sorting, Combinatorics β–Έ
Hard #3704 - Count No-Zero Pairs That Sum to N Math, Dynamic Programming β–Έ
Hard #3420 - Count Non-Decreasing Subarrays After K Operations Array, Stack, Segment Tree, Queue, Sliding Window, Monotonic Stack, Monotonic Queue β–Έ
Hard #3343 - Count Number of Balanced Permutations Math, String, Dynamic Programming, Combinatorics β–Έ
Hard #2581 - Count Number of Possible Root Nodes Array, Hash Table, Dynamic Programming, Tree, Depth-First Search β–Έ
Hard #1955 - Count Number of Special Subsequences Array, Dynamic Programming β–Έ
Hard #3625 - Count Number of Trapezoids II Array, Hash Table, Math, Geometry β–Έ
Hard #3519 - Count Numbers with Non-Decreasing Digits Math, String, Dynamic Programming β–Έ
Hard #2719 - Count of Integers Math, String, Dynamic Programming β–Έ
Hard #327 - Count of Range Sum Array, Binary Search, Divide and Conquer, Binary Indexed Tree, Segment Tree, Merge Sort, Ordered Set β–Έ
Hard #315 - Count of Smaller Numbers After Self Array, Binary Search, Divide and Conquer, Binary Indexed Tree, Segment Tree, Merge Sort, Ordered Set β–Έ
Hard #2902 - Count of Sub-Multisets With Bounded Sum Array, Hash Table, Dynamic Programming, Sliding Window β–Έ
Hard #1782 - Count Pairs Of Nodes Array, Hash Table, Two Pointers, Binary Search, Graph Theory, Sorting, Counting β–Έ
Hard #1803 - Count Pairs With XOR in a Range Array, Bit Manipulation, Trie β–Έ
Hard #2484 - Count Palindromic Subsequences String, Dynamic Programming β–Έ
Hard #2791 - Count Paths That Can Form a Palindrome in a Tree Dynamic Programming, Bit Manipulation, Tree, Depth-First Search, Bitmask β–Έ
Hard #3045 - Count Prefix and Suffix Pairs II Array, String, Trie, Rolling Hash, String Matching, Hash Function β–Έ
Hard #3797 - Count Routes to Climb a Rectangular Grid Array, Dynamic Programming, Matrix, Prefix Sum β–Έ
Hard #3850 - Count Sequences to K Array, Math, Dynamic Programming, Memoization, Number Theory β–Έ
Hard #2376 - Count Special Integers Math, Dynamic Programming β–Έ
Hard #3748 - Count Stable Subarrays Array, Binary Search, Prefix Sum β–Έ
Hard #2801 - Count Stepping Numbers in Range String, Dynamic Programming β–Έ
Hard #2444 - Count Subarrays With Fixed Bounds Array, Queue, Sliding Window, Monotonic Queue β–Έ
Hard #3859 - Count Subarrays With K Distinct Integers General β–Έ
Hard #3739 - Count Subarrays With Majority Element II Array, Hash Table, Divide and Conquer, Segment Tree, Merge Sort, Prefix Sum β–Έ
Hard #2488 - Count Subarrays With Median K Array, Hash Table, Prefix Sum β–Έ
Hard #2302 - Count Subarrays With Score Less Than K Array, Binary Search, Sliding Window, Prefix Sum β–Έ
Hard #3448 - Count Substrings Divisible By Last Digit String, Dynamic Programming β–Έ
Hard #3298 - Count Substrings That Can Be Rearranged to Contain a String II Hash Table, String, Sliding Window β–Έ
Hard #3261 - Count Substrings That Satisfy K-Constraint II Array, String, Binary Search, Sliding Window, Prefix Sum β–Έ
Hard #1617 - Count Subtrees With Max Distance Between Cities Dynamic Programming, Bit Manipulation, Tree, Enumeration, Bitmask β–Έ
Hard #3405 - Count the Number of Arrays with K Matching Adjacent Elements Math, Combinatorics β–Έ
Hard #2963 - Count the Number of Good Partitions Array, Hash Table, Math, Combinatorics β–Έ
Hard #3017 - Count the Number of Houses at a Certain Distance II Graph Theory, Prefix Sum β–Έ
Hard #2338 - Count the Number of Ideal Arrays Math, Dynamic Programming, Combinatorics, Number Theory β–Έ
Hard #2972 - Count the Number of Incremovable Subarrays II Array, Two Pointers, Binary Search β–Έ
Hard #2954 - Count the Number of Infection Sequences Array, Math, Combinatorics β–Έ
Hard #3193 - Count the Number of Inversions Array, Dynamic Programming β–Έ
Hard #2999 - Count the Number of Powerful Integers Math, String, Dynamic Programming β–Έ
Hard #3320 - Count The Number of Winning Sequences String, Dynamic Programming β–Έ
Hard CountTheRepetitions β–Έ
Hard #828 - Count Unique Characters of All Substrings of a Given String Hash Table, String, Dynamic Programming β–Έ
Hard #2867 - Count Valid Paths in a Tree Math, Dynamic Programming, Tree, Depth-First Search, Number Theory β–Έ
Hard #2876 - Count Visited Nodes in a Directed Graph Dynamic Programming, Graph Theory, Memoization β–Έ
Hard #1220 - Count Vowels Permutation Dynamic Programming β–Έ
Hard #1916 - Count Ways to Build Rooms in an Ant Colony Array, Math, Dynamic Programming, Tree, Depth-First Search, Graph Theory, Topological Sort, Combinatorics β–Έ
Hard #3725 - Count Ways to Choose Coprime Integers from Rows Array, Math, Dynamic Programming, Matrix, Combinatorics, Number Theory β–Έ
Hard #1735 - Count Ways to Make Array With Product Array, Math, Dynamic Programming, Combinatorics, Number Theory β–Έ
Hard CouplesHoldingHands β–Έ
Hard CourseScheduleIii β–Έ
Hard CrackingTheSafe β–Έ
Hard #2440 - Create Components With Same Value Array, Math, Tree, Depth-First Search, Enumeration β–Έ
Hard #321 - Create Maximum Number Array, Two Pointers, Stack, Greedy, Monotonic Stack β–Έ
Hard #1649 - Create Sorted Array through Instructions Array, Binary Search, Divide and Conquer, Binary Indexed Tree, Segment Tree, Merge Sort, Ordered Set β–Έ
Hard #1192 - Critical Connections in a Network Depth-First Search, Graph Theory, Biconnected Component β–Έ
Hard CutOffTreesForGolfEvent β–Έ
Hard #2509 - Cycle Length Queries in a Tree Array, Tree, Binary Tree β–Έ
Hard #352 - Data Stream as Disjoint Intervals Hash Table, Binary Search, Union-Find, Design, Data Stream, Ordered Set β–Έ
Hard DecodeWaysIi β–Έ
Hard #960 - Delete Columns to Make Sorted III Array, String, Dynamic Programming β–Έ
Hard #1948 - Delete Duplicate Folders in System Array, Hash Table, String, Trie, Hash Function β–Έ
Hard #1687 - Delivering Boxes from Storage to Ports Array, Dynamic Programming, Segment Tree, Queue, Heap (Priority Queue), Prefix Sum, Monotonic Queue β–Έ
Hard #2296 - Design a Text Editor Linked List, String, Stack, Design, Simulation, Doubly-Linked List β–Έ
Hard #2650 - Design Cancellable Function General β–Έ
Hard #2642 - Design Graph With Shortest Path Calculator Graph Theory, Design, Heap (Priority Queue), Shortest Path β–Έ
Hard #1912 - Design Movie Rental System Array, Hash Table, Design, Heap (Priority Queue), Ordered Set β–Έ
Hard #1206 - Design Skiplist Linked List, Design β–Έ
Hard #1223 - Dice Roll Simulation Array, Dynamic Programming β–Έ
Hard #2538 - Difference Between Maximum and Minimum Price Sum Array, Dynamic Programming, Tree, Depth-First Search β–Έ
Hard #1172 - Dinner Plate Stacks Hash Table, Stack, Design, Heap (Priority Queue) β–Έ
Hard #1316 - Distinct Echo Substrings String, Trie, Rolling Hash, Hash Function β–Έ
Hard #115 - Distinct Subsequences String, Dynamic Programming β–Έ
Hard #940 - Distinct Subsequences II String, Dynamic Programming β–Έ
Hard #3072 - Distribute Elements Into Two Arrays II Array, Binary Indexed Tree, Segment Tree, Simulation β–Έ
Hard #1655 - Distribute Repeating Integers Array, Hash Table, Dynamic Programming, Backtracking, Bit Manipulation, Counting, Bitmask β–Έ
Hard #3013 - Divide an Array Into Subarrays With Minimum Cost II Array, Hash Table, Sliding Window, Heap (Priority Queue) β–Έ
Hard #2493 - Divide Nodes Into the Maximum Number of Groups Depth-First Search, Breadth-First Search, Union-Find, Graph Theory β–Έ
Hard #174 - Dungeon Game Array, Dynamic Programming, Matrix β–Έ
Hard #2136 - Earliest Possible Day of Full Bloom Array, Greedy, Sorting β–Έ
Hard #3049 - Earliest Second to Mark Indices II Array, Binary Search, Greedy, Heap (Priority Queue) β–Έ
Hard #2227 - Encrypt and Decrypt Strings Array, Hash Table, String, Design, Trie β–Έ
Hard #972 - Equal Rational Numbers Math, String β–Έ
Hard #3548 - Equal Sum Grid Partition II Array, Hash Table, Matrix, Enumeration, Prefix Sum β–Έ
Hard ErectTheFence β–Έ
Hard #1036 - Escape a Large Maze Array, Hash Table, Depth-First Search, Breadth-First Search β–Έ
Hard #2258 - Escape the Spreading Fire Array, Binary Search, Breadth-First Search, Matrix β–Έ
Hard #282 - Expression Add Operators Math, String, Backtracking β–Έ
Hard FallingSquares β–Έ
Hard #1622 - Fancy Sequence Math, Design, Segment Tree β–Έ
Hard #3266 - Final Array State After K Multiplication Operations II Array, Heap (Priority Queue), Simulation β–Έ
Hard #2732 - Find a Good Subset of the Matrix Array, Hash Table, Bit Manipulation, Matrix β–Έ
Hard #1521 - Find a Value of a Mysterious Function Closest to Target Array, Binary Search, Bit Manipulation, Segment Tree β–Έ
Hard #1397 - Find All Good Strings String, Dynamic Programming, String Matching β–Έ
Hard #2092 - Find All People With Secret Depth-First Search, Breadth-First Search, Union-Find, Graph Theory, Sorting β–Έ
Hard #3130 - Find All Possible Stable Binary Arrays II Dynamic Programming, Prefix Sum β–Έ
Hard #1982 - Find Array Given Subset Sums Array, Divide and Conquer β–Έ
Hard #3008 - Find Beautiful Indices in the Given Array II Two Pointers, String, Binary Search, Rolling Hash, String Matching, Hash Function β–Έ
Hard #2940 - Find Building Where Alice and Bob Can Meet Array, Binary Search, Stack, Binary Indexed Tree, Segment Tree, Heap (Priority Queue), Monotonic Stack β–Έ
Hard #3554 - Find Category Recommendation Pairs <p><b>Difficulty:</b> Hard β–Έ
Hard #1489 - Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree Union-Find, Graph Theory, Sorting, Minimum Spanning Tree, Strongly Connected Component β–Έ
Hard #3123 - Find Edges in Shortest Paths Depth-First Search, Breadth-First Search, Graph Theory, Heap (Priority Queue), Shortest Path β–Έ
Hard #1095 - Find in Mountain Array Array, Binary Search, Interactive β–Έ
Hard #3451 - Find Invalid IP Addresses Database β–Έ
Hard FindKThSmallestPairDistance β–Έ
Hard #1542 - Find Longest Awesome Substring Hash Table, String, Bit Manipulation β–Έ
Hard #2945 - Find Maximum Non-decreasing Array Length Array, Binary Search, Dynamic Programming, Stack, Queue, Monotonic Stack, Monotonic Queue β–Έ
Hard #295 - Find Median from Data Stream Two Pointers, Design, Sorting, Heap (Priority Queue), Data Stream β–Έ
Hard #3203 - Find Minimum Diameter After Merging Two Trees Tree, Depth-First Search, Breadth-First Search, Graph Theory β–Έ
Hard #154 - Find Minimum in Rotated Sorted Array II Array, Binary Search β–Έ
Hard #1723 - Find Minimum Time to Finish All Jobs Array, Dynamic Programming, Backtracking, Bit Manipulation, Bitmask β–Έ
Hard #3821 - Find Nth Smallest Integer With K One Bits Math, Bit Manipulation, Combinatorics β–Έ
Hard #2973 - Find Number of Coins to Place in Tree Nodes Dynamic Programming, Tree, Depth-First Search, Sorting, Heap (Priority Queue) β–Έ
Hard #3154 - Find Number of Ways to Reach the K-th Stair Math, Dynamic Programming, Bit Manipulation, Memoization, Combinatorics β–Έ
Hard #3145 - Find Products of Elements of Big Array Array, Binary Search, Bit Manipulation β–Έ
Hard #1606 - Find Servers That Handled Most Number of Requests Array, Heap (Priority Queue), Simulation, Ordered Set β–Έ
Hard #3617 - Find Students with Study Spiral Pattern General β–Έ
Hard #3171 - Find Subarray With Bitwise OR Closest to K Array, Binary Search, Bit Manipulation, Segment Tree β–Έ
Hard #2156 - Find Substring With Given Hash Value String, Sliding Window, Rolling Hash, Hash Function β–Έ
Hard #3539 - Find Sum of Array Product of Magical Sequences Array, Math, Dynamic Programming, Bit Manipulation, Combinatorics, Bitmask β–Έ
Hard FindTheClosestPalindrome β–Έ
Hard #3272 - Find the Count of Good Integers Hash Table, Math, Combinatorics, Enumeration β–Έ
Hard #3250 - Find the Count of Monotonic Pairs I Array, Math, Dynamic Programming, Combinatorics, Prefix Sum β–Έ
Hard #3251 - Find the Count of Monotonic Pairs II Array, Math, Dynamic Programming, Combinatorics, Prefix Sum β–Έ
Hard #2386 - Find the K-Sum of an Array Array, Sorting, Heap (Priority Queue) β–Έ
Hard #3307 - Find the K-th Character in String Game II Math, Bit Manipulation, Recursion β–Έ
Hard #1439 - Find the Kth Smallest Sum of a Matrix With Sorted Rows Array, Binary Search, Heap (Priority Queue), Matrix β–Έ
Hard #3260 - Find the Largest Palindrome Divisible by K Math, String, Dynamic Programming, Greedy, Number Theory β–Έ
Hard #1964 - Find the Longest Valid Obstacle Course at Each Position Array, Binary Search, Binary Indexed Tree β–Έ
Hard #3177 - Find the Maximum Length of a Good Subsequence II Array, Hash Table, Dynamic Programming β–Έ
Hard #3363 - Find the Maximum Number of Fruits Collected Array, Dynamic Programming, Matrix β–Έ
Hard #3287 - Find the Maximum Sequence Value of Array Array, Dynamic Programming, Bit Manipulation β–Έ
Hard #3068 - Find the Maximum Sum of Node Values Array, Dynamic Programming, Greedy, Bit Manipulation, Tree, Sorting β–Έ
Hard #3134 - Find the Median of the Uniqueness Array Array, Hash Table, Binary Search, Sliding Window β–Έ
Hard #3197 - Find the Minimum Area to Cover All Ones II Array, Matrix, Enumeration β–Έ
Hard #3149 - Find the Minimum Cost Array Permutation Array, Dynamic Programming, Bit Manipulation, Bitmask β–Έ
Hard #3317 - Find the Number of Possible Ways for an Event Math, Dynamic Programming, Combinatorics β–Έ
Hard #3113 - Find the Number of Subarrays Where Boundary Elements Are Maximum Array, Binary Search, Stack, Monotonic Stack β–Έ
Hard #3336 - Find the Number of Subsequences With Equal GCD Array, Math, Dynamic Programming, Number Theory β–Έ
Hard #3027 - Find the Number of Ways to Place People II Array, Math, Geometry, Sorting, Enumeration β–Έ
Hard #3303 - Find the Occurrence of First Almost Equal Substring String, String Matching β–Έ
Hard #3333 - Find the Original Typed String II String, Dynamic Programming, Prefix Sum β–Έ
Hard #943 - Find the Shortest Superstring Array, String, Dynamic Programming, Bit Manipulation, Bitmask β–Έ
Hard #2573 - Find the String with LCP Array, String, Dynamic Programming, Greedy, Union-Find, Matrix β–Έ
Hard #3098 - Find the Sum of Subsequence Powers Array, Dynamic Programming, Sorting β–Έ
Hard #3082 - Find the Sum of the Power of All Subsequences Array, Dynamic Programming β–Έ
Hard #3832 - Find Users with Persistent Behavior Patterns General β–Έ
Hard #3585 - Find Weighted Median Node in Tree Array, Binary Search, Dynamic Programming, Bit Manipulation, Tree, Depth-First Search β–Έ
Hard #3321 - Find X-Sum of All K-Long Subarrays II Array, Hash Table, Sliding Window, Heap (Priority Queue) β–Έ
Hard #3525 - Find X Value of Array II Array, Math, Segment Tree β–Έ
Hard #1835 - Find XOR Sum of All Pairs Bitwise AND Array, Math, Bit Manipulation β–Έ
Hard #3673 - Find Zombie Sessions General β–Έ
Hard #1825 - Finding MK Average Design, Queue, Heap (Priority Queue), Data Stream, Ordered Set β–Έ
Hard #3374 - First Letter Capitalization II Database β–Έ
Hard #41 - First Missing Positive Array, Hash Table β–Έ
Hard #1449 - Form Largest Integer With Digits That Add up to Target Array, Dynamic Programming β–Έ
Hard FreedomTrail β–Έ
Hard #3435 - Frequencies of Shortest Supersequences Array, String, Bit Manipulation, Graph Theory, Topological Sort, Enumeration β–Έ
Hard FrogJump β–Έ
Hard #1377 - Frog Position After T Seconds Tree, Depth-First Search, Breadth-First Search, Graph Theory β–Έ
Hard #1998 - GCD Sort of an Array Array, Math, Union-Find, Sorting, Number Theory β–Έ
Hard #1537 - Get the Maximum Score Array, Two Pointers, Dynamic Programming, Greedy β–Έ
Hard #1627 - Graph Connectivity With Threshold Array, Math, Union-Find, Number Theory β–Έ
Hard #2709 - Greatest Common Divisor Traversal Array, Math, Union-Find, Number Theory β–Έ
Hard #1001 - Grid Illumination Array, Hash Table β–Έ
Hard #2157 - Groups of Strings Array, Hash Table, String, Bit Manipulation, Union-Find β–Έ
Hard #843 - Guess the Word Array, Math, String, Interactive, Game Theory β–Έ
Hard #2569 - Handling Sum Queries After Update Array, Segment Tree β–Έ
Hard #2458 - Height of Binary Tree After Subtree Removal Queries Array, Tree, Depth-First Search, Breadth-First Search, Binary Tree β–Έ
Hard #381 - Insert Delete GetRandom O(1) - Duplicates allowed Array, Hash Table, Math, Design, Randomized β–Έ
Hard #273 - Integer to English Words Math, String, Recursion β–Έ
Hard Ipo β–Έ
Hard #1345 - Jump Game IV Array, Hash Table, Breadth-First Search β–Έ
Hard #1340 - Jump Game V Array, Dynamic Programming, Sorting β–Έ
Hard KInversePairsArray β–Έ
Hard #854 - K-Similar Strings Hash Table, String, Breadth-First Search β–Έ
Hard KThSmallestInLexicographicalOrder β–Έ
Hard #1483 - Kth Ancestor of a Tree Node Binary Search, Dynamic Programming, Bit Manipulation, Tree, Depth-First Search, Breadth-First Search, Design β–Έ
Hard #3116 - Kth Smallest Amount With Single Denomination Combination Array, Math, Binary Search, Bit Manipulation, Combinatorics, Number Theory β–Έ
Hard #1643 - Kth Smallest Instructions Array, Math, Dynamic Programming, Combinatorics β–Έ
Hard KthSmallestNumberInMultiplicationTable β–Έ
Hard #3590 - Kth Smallest Path XOR Sum Array, Tree, Depth-First Search, Ordered Set β–Έ
Hard #2040 - Kth Smallest Product of Two Sorted Arrays Array, Binary Search β–Έ
Hard #1857 - Largest Color Value in a Directed Graph Hash Table, String, Dynamic Programming, Graph Theory, Topological Sort, Memoization, Counting β–Έ
Hard #952 - Largest Component Size by Common Factor Array, Hash Table, Math, Union-Find, Number Theory β–Έ
Hard #1363 - Largest Multiple of Three Array, Math, Dynamic Programming, Greedy, Sorting β–Έ
Hard LargestPalindromeProduct β–Έ
Hard #84 - Largest Rectangle in Histogram Array, Stack, Monotonic Stack β–Έ
Hard #1970 - Last Day Where You Can Still Cross Array, Binary Search, Depth-First Search, Breadth-First Search, Union-Find, Matrix β–Έ
Hard #3782 - Last Remaining Integer After Alternating Deletion Operations Math, Recursion β–Έ
Hard #1163 - Last Substring in Lexicographical Order Two Pointers, String β–Έ
Hard #964 - Least Operators to Express Number Math, Dynamic Programming, Memoization β–Έ
Hard #3459 - Length of Longest V-Shaped Diagonal Segment Array, Dynamic Programming, Memoization, Matrix β–Έ
Hard #3288 - Length of the Longest Increasing Path Array, Binary Search, Sorting β–Έ
Hard #2781 - Length of the Longest Valid Substring Array, Hash Table, String, Sliding Window β–Έ
Hard #2663 - Lexicographically Smallest Beautiful String String, Greedy β–Έ
Hard #3474 - Lexicographically Smallest Generated String String, Greedy, String Matching β–Έ
Hard #3734 - Lexicographically Smallest Palindromic Permutation Greater Than Target Two Pointers, String, Enumeration β–Έ
Hard #3563 - Lexicographically Smallest String After Adjacent Removals String, Dynamic Programming β–Έ
Hard #3816 - Lexicographically Smallest String After Deleting Duplicate Characters Hash Table, String, Stack, Greedy, Monotonic Stack β–Έ
Hard LfuCache β–Έ
Hard #3830 - Longest Alternating Subarray After Removing At Most One Element Array, Dynamic Programming, Enumeration β–Έ
Hard #3721 - Longest Balanced Subarray II Array, Hash Table, Divide and Conquer, Segment Tree, Prefix Sum β–Έ
Hard #1147 - Longest Chunked Palindrome Decomposition Two Pointers, String, Dynamic Programming, Greedy, Rolling Hash, Hash Function β–Έ
Hard #3485 - Longest Common Prefix of K Strings After Removal Array, String, Trie β–Έ
Hard #1923 - Longest Common Subpath Array, Binary Search, Rolling Hash, Suffix Array, Hash Function β–Έ
Hard #3093 - Longest Common Suffix Queries Array, String, Trie β–Έ
Hard #2360 - Longest Cycle in a Graph Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort β–Έ
Hard #1044 - Longest Duplicate Substring String, Binary Search, Sliding Window, Rolling Hash, Suffix Array, Hash Function β–Έ
Hard #1392 - Longest Happy Prefix String, Rolling Hash, String Matching, Hash Function β–Έ
Hard #329 - Longest Increasing Path in a Matrix Array, Dynamic Programming, Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort, Memoization, Matrix β–Έ
Hard #2407 - Longest Increasing Subsequence II Array, Divide and Conquer, Dynamic Programming, Binary Indexed Tree, Segment Tree, Queue, Monotonic Queue β–Έ
Hard #3504 - Longest Palindrome After Substring Concatenation II Two Pointers, String, Dynamic Programming β–Έ
Hard #3615 - Longest Palindromic Path in Graph String, Dynamic Programming, Bit Manipulation, Graph Theory, Bitmask β–Έ
Hard #2246 - Longest Path With Different Adjacent Characters Array, String, Tree, Depth-First Search, Graph Theory, Topological Sort β–Έ
Hard #3425 - Longest Special Path Array, Hash Table, Tree, Depth-First Search, Prefix Sum β–Έ
Hard #3486 - Longest Special Path II Array, Hash Table, Tree, Depth-First Search, Prefix Sum β–Έ
Hard #2014 - Longest Subsequence Repeated k Times Hash Table, Two Pointers, String, Backtracking, Counting, Enumeration β–Έ
Hard #2213 - Longest Substring of One Repeating Character Array, String, Segment Tree, Ordered Set β–Έ
Hard #32 - Longest Valid Parentheses String, Dynamic Programming, Stack β–Έ
Hard #2659 - Make Array Empty Array, Binary Search, Greedy, Binary Indexed Tree, Segment Tree, Sorting, Ordered Set β–Έ
Hard #1187 - Make Array Strictly Increasing Array, Binary Search, Dynamic Programming, Sorting β–Έ
Hard #1787 - Make the XOR of All Segments Equal to Zero Array, Hash Table, Dynamic Programming, Bit Manipulation, Counting β–Έ
Hard #827 - Making A Large Island Array, Depth-First Search, Breadth-First Search, Union-Find, Matrix β–Έ
Hard #3426 - Manhattan Distances of All Arrangements of Pieces Math, Combinatorics β–Έ
Hard #2301 - Match Substring After Replacement Array, Hash Table, String, String Matching β–Έ
Hard MaxChunksToMakeSortedIi β–Έ
Hard #1458 - Max Dot Product of Two Subsequences Array, Dynamic Programming β–Έ
Hard #149 - Max Points on a Line Array, Hash Table, Math, Geometry β–Έ
Hard #363 - Max Sum of Rectangle No Larger Than K Array, Binary Search, Matrix, Prefix Sum, Ordered Set β–Έ
Hard #1499 - Max Value of Equation Array, Queue, Sliding Window, Heap (Priority Queue), Monotonic Queue β–Έ
Hard #85 - Maximal Rectangle Array, Dynamic Programming, Stack, Matrix, Monotonic Stack β–Έ
Hard #3501 - Maximize Active Section with Trade II Array, String, Binary Search, Segment Tree β–Έ
Hard #3695 - Maximize Alternating Sum Using Swaps Array, Greedy, Union-Find, Sorting β–Έ
Hard #3041 - Maximize Consecutive Elements in an Array After Modification Array, Dynamic Programming, Sorting β–Έ
Hard #3569 - Maximize Count of Distinct Primes After Split Array, Math, Segment Tree, Number Theory β–Έ
Hard #3743 - Maximize Cyclic Partition Score Array, Dynamic Programming β–Έ
Hard #1659 - Maximize Grid Happiness Dynamic Programming, Bit Manipulation, Memoization, Bitmask β–Έ
Hard #1808 - Maximize Number of Nice Divisors Math, Recursion, Number Theory β–Έ
Hard #1771 - Maximize Palindrome Length From Subsequences String, Dynamic Programming β–Έ
Hard #1799 - Maximize Score After N Operations Array, Math, Dynamic Programming, Backtracking, Bit Manipulation, Number Theory, Bitmask β–Έ
Hard #3600 - Maximize Spanning Tree Stability with Upgrades Binary Search, Greedy, Union-Find, Graph Theory, Minimum Spanning Tree β–Έ
Hard #3574 - Maximize Subarray GCD Score Array, Math, Enumeration, Number Theory β–Έ
Hard #3410 - Maximize Subarray Sum After Removing All Occurrences of One Element Array, Dynamic Programming, Segment Tree β–Έ
Hard #3480 - Maximize Subarrays After Removing One Conflicting Pair Array, Segment Tree, Enumeration, Prefix Sum β–Έ
Hard #3367 - Maximize Sum of Weights after Edge Removals Dynamic Programming, Tree, Depth-First Search, Sorting β–Έ
Hard #3464 - Maximize the Distance Between Points on a Square Array, Math, Binary Search, Geometry, Sorting β–Έ
Hard #3449 - Maximize the Minimum Game Score Array, Binary Search, Greedy β–Έ
Hard #2528 - Maximize the Minimum Powered City Array, Binary Search, Greedy, Queue, Sliding Window, Prefix Sum β–Έ
Hard #3003 - Maximize the Number of Partitions After Operations String, Dynamic Programming, Bit Manipulation, Bitmask β–Έ
Hard #3373 - Maximize the Number of Target Nodes After Connecting Trees II Tree, Depth-First Search, Breadth-First Search β–Έ
Hard #2836 - Maximize Value of Function in a Ball Passing Game Array, Dynamic Programming, Bit Manipulation β–Έ
Hard #3430 - Maximum and Minimum Sums of at Most Size K Subarrays Array, Math, Stack, Monotonic Stack β–Έ
Hard #2172 - Maximum AND Sum of Array Array, Dynamic Programming, Bit Manipulation, Bitmask β–Έ
Hard #3382 - Maximum Area Rectangle With Point Constraints II Array, Math, Binary Indexed Tree, Segment Tree, Geometry, Sorting β–Έ
Hard #2926 - Maximum Balanced Subsequence Sum Array, Binary Search, Dynamic Programming, Binary Indexed Tree, Segment Tree β–Έ
Hard #3806 - Maximum Bitwise AND After Increment Operations Array, Greedy, Bit Manipulation, Sorting β–Έ
Hard #1840 - Maximum Building Height Array, Math, Sorting β–Έ
Hard #1298 - Maximum Candies You Can Get from Boxes Array, Breadth-First Search, Graph Theory β–Έ
Hard #2430 - Maximum Deletions on a String String, Dynamic Programming, Rolling Hash, String Matching, Hash Function β–Έ
Hard #3445 - Maximum Difference Between Even and Odd Frequency II String, Sliding Window, Enumeration, Prefix Sum β–Έ
Hard #2813 - Maximum Elegance of a K-Length Subsequence Array, Hash Table, Stack, Greedy, Sorting, Heap (Priority Queue) β–Έ
Hard #2862 - Maximum Element-Sum of a Complete Subset of Indices Array, Math, Number Theory β–Έ
Hard #2127 - Maximum Employees to Be Invited to a Meeting Array, Dynamic Programming, Depth-First Search, Graph Theory, Topological Sort β–Έ
Hard #1224 - Maximum Equal Frequency Array, Hash Table β–Έ
Hard #3347 - Maximum Frequency of an Element After Performing Operations II Array, Binary Search, Sliding Window, Sorting, Prefix Sum β–Έ
Hard #895 - Maximum Frequency Stack Hash Table, Stack, Design, Ordered Set β–Έ
Hard #2106 - Maximum Fruits Harvested After at Most K Steps Array, Binary Search, Sliding Window, Prefix Sum β–Έ
Hard #1938 - Maximum Genetic Difference Query Array, Hash Table, Bit Manipulation, Depth-First Search, Trie β–Έ
Hard #2151 - Maximum Good People Based on Statements Array, Backtracking, Bit Manipulation, Enumeration β–Έ
Hard #3575 - Maximum Good Subtree Score Array, Dynamic Programming, Bit Manipulation, Tree, Depth-First Search, Bitmask β–Έ
Hard #1691 - Maximum Height by Stacking Cuboids Array, Dynamic Programming, Sorting β–Έ
Hard #1601 - Maximum Number of Achievable Transfer Requests Array, Backtracking, Bit Manipulation, Enumeration β–Έ
Hard #1453 - Maximum Number of Darts Inside of a Circular Dartboard Array, Math, Geometry β–Έ
Hard #1751 - Maximum Number of Events That Can Be Attended II Array, Binary Search, Dynamic Programming, Sorting β–Έ
Hard #1815 - Maximum Number of Groups Getting Fresh Donuts Array, Dynamic Programming, Bit Manipulation, Memoization, Bitmask β–Έ
Hard #2790 - Maximum Number of Groups With Increasing Length Array, Math, Binary Search, Greedy, Sorting β–Έ
Hard #2872 - Maximum Number of K-Divisible Components Tree, Depth-First Search β–Έ
Hard #3283 - Maximum Number of Moves to Kill All Pawns Array, Math, Bit Manipulation, Breadth-First Search, Game Theory, Bitmask β–Έ
Hard #2472 - Maximum Number of Non-overlapping Palindrome Substrings Two Pointers, String, Dynamic Programming, Greedy β–Έ
Hard #1520 - Maximum Number of Non-Overlapping Substrings Hash Table, String, Greedy, Sorting β–Έ
Hard #2503 - Maximum Number of Points From Grid Queries Array, Two Pointers, Breadth-First Search, Union-Find, Sorting, Heap (Priority Queue), Matrix β–Έ
Hard #2398 - Maximum Number of Robots Within Budget Array, Binary Search, Queue, Sliding Window, Heap (Priority Queue), Prefix Sum, Monotonic Queue β–Έ
Hard #2071 - Maximum Number of Tasks You Can Assign Array, Two Pointers, Binary Search, Greedy, Queue, Sorting, Monotonic Queue β–Έ
Hard #1610 - Maximum Number of Visible Points Array, Math, Geometry, Sliding Window, Sorting β–Έ
Hard #2025 - Maximum Number of Ways to Partition an Array Array, Hash Table, Counting, Enumeration, Prefix Sum β–Έ
Hard #3710 - Maximum Partition Factor Array, Binary Search, Depth-First Search, Breadth-First Search, Union-Find, Graph Theory β–Έ
Hard #2065 - Maximum Path Quality of a Graph Array, Backtracking, Graph Theory β–Έ
Hard #1383 - Maximum Performance of a Team Array, Greedy, Sorting, Heap (Priority Queue) β–Έ
Hard #2920 - Maximum Points After Collecting Coins From All Nodes Array, Dynamic Programming, Bit Manipulation, Tree, Depth-First Search, Memoization β–Έ
Hard #3509 - Maximum Product of Subsequences With an Alternating Sum Equal to K Array, Hash Table, Dynamic Programming β–Έ
Hard #1960 - Maximum Product of the Length of Two Palindromic Substrings Two Pointers, String, Rolling Hash, Hash Function β–Έ
Hard #3562 - Maximum Profit from Trading Stocks with Discounts Array, Dynamic Programming, Tree, Depth-First Search β–Έ
Hard #3530 - Maximum Profit from Valid Topological Order in DAG Array, Dynamic Programming, Bit Manipulation, Graph Theory, Topological Sort, Bitmask β–Έ
Hard #1235 - Maximum Profit in Job Scheduling Array, Binary Search, Dynamic Programming, Sorting β–Έ
Hard #2141 - Maximum Running Time of N Computers Array, Binary Search, Greedy, Sorting β–Έ
Hard #3225 - Maximum Score From Grid Operations Array, Dynamic Programming, Matrix, Prefix Sum β–Έ
Hard #1770 - Maximum Score from Performing Multiplication Operations Array, Dynamic Programming β–Έ
Hard #1793 - Maximum Score of a Good Subarray Array, Two Pointers, Binary Search, Stack, Monotonic Stack β–Έ
Hard #2242 - Maximum Score of a Node Sequence Array, Graph Theory, Sorting, Enumeration β–Έ
Hard #3414 - Maximum Score of Non-overlapping Intervals Array, Binary Search, Dynamic Programming, Sorting β–Έ
Hard #2321 - Maximum Score Of Spliced Array Array, Dynamic Programming β–Έ
Hard #3836 - Maximum Score Using Exactly K Pairs Array, Dynamic Programming β–Έ
Hard #1255 - Maximum Score Words Formed by Letters Array, Hash Table, String, Dynamic Programming, Backtracking, Bit Manipulation, Counting, Bitmask β–Έ
Hard #2382 - Maximum Segment Sum After Removals Array, Union-Find, Prefix Sum, Ordered Set β–Έ
Hard #2931 - Maximum Spending After Buying Items Array, Greedy, Sorting, Heap (Priority Queue), Matrix β–Έ
Hard #3077 - Maximum Strength of K Disjoint Subarrays Array, Dynamic Programming, Prefix Sum β–Έ
Hard #2713 - Maximum Strictly Increasing Cells in a Matrix Array, Hash Table, Binary Search, Dynamic Programming, Memoization, Sorting, Matrix, Ordered Set β–Έ
Hard #2935 - Maximum Strong Pair XOR II Array, Hash Table, Bit Manipulation, Trie, Sliding Window β–Έ
Hard #1349 - Maximum Students Taking Exam Array, Dynamic Programming, Bit Manipulation, Matrix, Bitmask β–Έ
Hard #3845 - Maximum Subarray XOR with Bounded Range Array, Bit Manipulation, Trie, Queue, Sliding Window, Prefix Sum, Monotonic Queue β–Έ
Hard #3772 - Maximum Subgraph Score in a Tree Array, Dynamic Programming, Tree, Depth-First Search β–Έ
Hard #1373 - Maximum Sum BST in Binary Tree Dynamic Programming, Tree, Depth-First Search, Binary Search Tree, Binary Tree β–Έ
Hard MaximumSumOf3NonOverlappingSubarrays β–Έ
Hard #3547 - Maximum Sum of Edge Values in a Graph Math, Greedy, Graph Theory β–Έ
Hard #3165 - Maximum Sum of Subsequence With Non-adjacent Elements Array, Divide and Conquer, Dynamic Programming, Segment Tree β–Έ
Hard #2736 - Maximum Sum Queries Array, Binary Search, Stack, Binary Indexed Tree, Segment Tree, Sorting, Monotonic Stack β–Έ
Hard #2234 - Maximum Total Beauty of the Gardens Array, Two Pointers, Binary Search, Greedy, Sorting, Enumeration, Prefix Sum β–Έ
Hard #3181 - Maximum Total Reward Using Operations II Array, Dynamic Programming, Bit Manipulation β–Έ
Hard #3691 - Maximum Total Subarray Value II Array, Greedy, Segment Tree, Heap (Priority Queue) β–Έ
Hard #2218 - Maximum Value of K Coins From Piles Array, Dynamic Programming, Prefix Sum β–Έ
Hard #3256 - Maximum Value Sum by Placing Three Rooks I Array, Dynamic Programming, Matrix, Enumeration β–Έ
Hard #3257 - Maximum Value Sum by Placing Three Rooks II Array, Dynamic Programming, Matrix, Enumeration β–Έ
Hard #3661 - Maximum Walls Destroyed by Robots Array, Binary Search, Dynamic Programming, Sorting β–Έ
Hard #3681 - Maximum XOR of Subsequences Array, Math, Greedy, Bit Manipulation β–Έ
Hard #3277 - Maximum XOR Score Subarray Queries Array, Dynamic Programming β–Έ
Hard #1707 - Maximum XOR With an Element From Array Array, Bit Manipulation, Trie β–Έ
Hard #4 - Median of Two Sorted Arrays Array, Binary Search, Divide and Conquer β–Έ
Hard #2402 - Meeting Rooms III Array, Hash Table, Sorting, Heap (Priority Queue), Simulation β–Έ
Hard #2630 - Memoize II General β–Έ
Hard #1932 - Merge BSTs to Create Single BST Array, Hash Table, Tree, Depth-First Search, Binary Search Tree, Binary Tree β–Έ
Hard #23 - Merge k Sorted Lists Linked List, Divide and Conquer, Heap (Priority Queue), Merge Sort β–Έ
Hard #3538 - Merge Operations for Minimum Travel Time Array, Dynamic Programming, Prefix Sum β–Έ
Hard #1675 - Minimize Deviation in Array Array, Greedy, Heap (Priority Queue), Ordered Set β–Έ
Hard #924 - Minimize Malware Spread Array, Hash Table, Depth-First Search, Breadth-First Search, Union-Find, Graph Theory β–Έ
Hard #928 - Minimize Malware Spread II Array, Hash Table, Depth-First Search, Breadth-First Search, Union-Find, Graph Theory β–Έ
Hard #3102 - Minimize Manhattan Distances Array, Math, Geometry, Sorting, Ordered Set β–Έ
Hard #3022 - Minimize OR of Remaining Elements Using Operations Array, Greedy, Bit Manipulation β–Έ
Hard #3357 - Minimize the Maximum Adjacent Element Difference Array, Binary Search, Greedy β–Έ
Hard #2646 - Minimize the Total Price of the Trips Array, Dynamic Programming, Tree, Depth-First Search, Graph Theory β–Έ
Hard #1703 - Minimum Adjacent Swaps for K Consecutive Ones Array, Greedy, Sliding Window, Prefix Sum β–Έ
Hard #3273 - Minimum Amount of Damage Dealt to Bob Array, Greedy, Sorting β–Έ
Hard #2911 - Minimum Changes to Make K Semi-palindromes Two Pointers, String, Dynamic Programming β–Έ
Hard #3219 - Minimum Cost for Cutting Cake II Array, Greedy, Sorting β–Έ
Hard #3441 - Minimum Cost Good Caption String, Dynamic Programming β–Έ
Hard #3651 - Minimum Cost Path with Teleportations Array, Dynamic Programming, Matrix β–Έ
Hard #1896 - Minimum Cost to Change the Final Value of Expression Math, String, Dynamic Programming, Stack β–Έ
Hard #1595 - Minimum Cost to Connect Two Groups of Points Array, Dynamic Programming, Bit Manipulation, Matrix, Bitmask β–Έ
Hard #2977 - Minimum Cost to Convert String II Array, String, Dynamic Programming, Graph Theory, Trie, Shortest Path β–Έ
Hard #1547 - Minimum Cost to Cut a Stick Array, Dynamic Programming, Sorting β–Έ
Hard #3500 - Minimum Cost to Divide Array Into Subarrays Array, Dynamic Programming, Prefix Sum β–Έ
Hard #3139 - Minimum Cost to Equalize Array Array, Greedy, Enumeration β–Έ
Hard #857 - Minimum Cost to Hire K Workers Array, Greedy, Sorting, Heap (Priority Queue) β–Έ
Hard #2448 - Minimum Cost to Make Array Equal Array, Binary Search, Greedy, Sorting, Prefix Sum β–Έ
Hard #1368 - Minimum Cost to Make at Least One Valid Path in a Grid Array, Breadth-First Search, Graph Theory, Heap (Priority Queue), Matrix, Shortest Path β–Έ
Hard #3801 - Minimum Cost to Merge Sorted Lists Array, Two Pointers, Binary Search, Dynamic Programming, Bit Manipulation β–Έ
Hard #1000 - Minimum Cost to Merge Stones Array, Dynamic Programming, Prefix Sum β–Έ
Hard #1928 - Minimum Cost to Reach Destination in Time Array, Dynamic Programming, Graph Theory β–Έ
Hard #2547 - Minimum Cost to Split an Array Array, Hash Table, Dynamic Programming, Counting β–Έ
Hard #3108 - Minimum Cost Walk in Weighted Graph Array, Bit Manipulation, Union-Find, Graph Theory β–Έ
Hard #1761 - Minimum Degree of a Connected Trio in a Graph Graph Theory, Enumeration β–Έ
Hard #3777 - Minimum Deletions to Make Alternating Substring String, Segment Tree β–Έ
Hard #2344 - Minimum Deletions to Make Array Divisible Array, Math, Sorting, Heap (Priority Queue), Number Theory β–Έ
Hard #2163 - Minimum Difference in Sums After Removal of Elements Array, Dynamic Programming, Heap (Priority Queue) β–Έ
Hard #1335 - Minimum Difficulty of a Job Schedule Array, Dynamic Programming β–Έ
Hard #1320 - Minimum Distance to Type a Word Using Two Fingers String, Dynamic Programming β–Έ
Hard #2858 - Minimum Edge Reversals So Every Node Is Reachable Dynamic Programming, Depth-First Search, Breadth-First Search, Graph Theory β–Έ
Hard #3812 - Minimum Edge Toggles on a Tree Tree, Depth-First Search, Graph Theory, Topological Sort, Sorting β–Έ
Hard #2846 - Minimum Edge Weight Equilibrium Queries in a Tree Array, Tree, Graph Theory, Strongly Connected Component β–Έ
Hard #1289 - Minimum Falling Path Sum II Array, Dynamic Programming, Matrix β–Έ
Hard #1681 - Minimum Incompatibility Array, Hash Table, Dynamic Programming, Bit Manipulation, Bitmask β–Έ
Hard #3444 - Minimum Increments for Target Multiples in an Array Array, Math, Dynamic Programming, Bit Manipulation, Number Theory, Bitmask β–Έ
Hard #1665 - Minimum Initial Energy to Finish Tasks Array, Greedy, Sorting β–Έ
Hard #1312 - Minimum Insertion Steps to Make a String Palindrome String, Dynamic Programming β–Έ
Hard #1851 - Minimum Interval to Include Each Query Array, Binary Search, Sweep Line, Sorting, Heap (Priority Queue) β–Έ
Hard #3768 - Minimum Inversion Count in Subarrays of Fixed Length Array, Segment Tree, Sliding Window β–Έ
Hard #2412 - Minimum Money Required Before Transactions Array, Greedy, Sorting β–Έ
Hard #1263 - Minimum Moves to Move a Box to Their Target Location Array, Breadth-First Search, Heap (Priority Queue), Matrix β–Έ
Hard #3086 - Minimum Moves to Pick K Ones Array, Greedy, Sliding Window, Prefix Sum β–Έ
Hard #3609 - Minimum Moves to Reach Target in Grid Math β–Έ
Hard #1210 - Minimum Moves to Reach Target with Rotations Array, Breadth-First Search, Matrix β–Έ
Hard #1568 - Minimum Number of Days to Disconnect Island Array, Depth-First Search, Breadth-First Search, Matrix, Strongly Connected Component β–Έ
Hard #1553 - Minimum Number of Days to Eat N Oranges Dynamic Programming, Memoization β–Έ
Hard #1284 - Minimum Number of Flips to Convert Binary Matrix to Zero Matrix Array, Hash Table, Bit Manipulation, Breadth-First Search, Matrix β–Έ
Hard #1526 - Minimum Number of Increments on Subarrays to Form a Target Array Array, Dynamic Programming, Stack, Greedy, Monotonic Stack β–Έ
Hard #995 - Minimum Number of K Consecutive Bit Flips Array, Bit Manipulation, Queue, Sliding Window, Prefix Sum β–Έ
Hard #2193 - Minimum Number of Moves to Make Palindrome Two Pointers, String, Greedy, Binary Indexed Tree β–Έ
Hard #2009 - Minimum Number of Operations to Make Array Continuous Array, Hash Table, Binary Search, Sliding Window β–Έ
Hard #2449 - Minimum Number of Operations to Make Arrays Similar Array, Greedy, Sorting β–Έ
Hard #1830 - Minimum Number of Operations to Make String Sorted Hash Table, Math, String, Combinatorics, Counting β–Έ
Hard #871 - Minimum Number of Refueling Stops Array, Dynamic Programming, Greedy, Heap (Priority Queue) β–Έ
Hard #1671 - Minimum Number of Removals to Make Mountain Array Array, Binary Search, Dynamic Programming, Greedy β–Έ
Hard #1326 - Minimum Number of Taps to Open to Water a Garden Array, Dynamic Programming, Greedy β–Έ
Hard #3292 - Minimum Number of Valid Strings to Form Target II Array, String, Binary Search, Dynamic Programming, Segment Tree, Rolling Hash, String Matching, Hash Function β–Έ
Hard #2617 - Minimum Number of Visited Cells in a Grid Array, Dynamic Programming, Stack, Breadth-First Search, Union-Find, Heap (Priority Queue), Matrix, Monotonic Stack β–Έ
Hard #2290 - Minimum Obstacle Removal to Reach Corner Array, Breadth-First Search, Graph Theory, Heap (Priority Queue), Matrix, Shortest Path β–Έ
Hard #1611 - Minimum One Bit Operations to Make Integers Zero Math, Dynamic Programming, Bit Manipulation, Recursion, Memoization β–Έ
Hard #3666 - Minimum Operations to Equalize Binary String Math, String, Breadth-First Search, Union-Find, Ordered Set β–Έ
Hard #3762 - Minimum Operations to Equalize Subarrays Array, Math, Binary Search, Segment Tree β–Έ
Hard #2835 - Minimum Operations to Form Subsequence With Target Sum Array, Greedy, Bit Manipulation β–Έ
Hard #1713 - Minimum Operations to Make a Subsequence Array, Hash Table, Binary Search, Greedy β–Έ
Hard #3495 - Minimum Operations to Make Array Elements Zero Array, Math, Bit Manipulation β–Έ
Hard #3229 - Minimum Operations to Make Array Equal to Target Array, Dynamic Programming, Stack, Greedy, Monotonic Stack β–Έ
Hard #3389 - Minimum Operations to Make Character Frequencies Equal Hash Table, String, Dynamic Programming, Counting, Enumeration β–Έ
Hard #3505 - Minimum Operations to Make Elements Within K Subarrays Equal Array, Hash Table, Math, Dynamic Programming, Sliding Window, Heap (Priority Queue) β–Έ
Hard #2111 - Minimum Operations to Make the Array K-Increasing Array, Binary Search β–Έ
Hard #3510 - Minimum Pair Removal to Sort Array II Array, Hash Table, Linked List, Heap (Priority Queue), Simulation, Doubly-Linked List, Ordered Set β–Έ
Hard #3826 - Minimum Partition Score Array, Divide and Conquer, Dynamic Programming, Queue, Prefix Sum, Monotonic Queue β–Έ
Hard #1505 - Minimum Possible Integer After at Most K Adjacent Swaps On Digits String, Greedy, Binary Indexed Tree, Segment Tree β–Έ
Hard #2366 - Minimum Replacements to Sort the Array Array, Math, Greedy β–Έ
Hard #2612 - Minimum Reverse Operations Array, Hash Table, Breadth-First Search, Union-Find, Ordered Set β–Έ
Hard #2322 - Minimum Score After Removals on a Tree Array, Bit Manipulation, Tree, Depth-First Search β–Έ
Hard #1883 - Minimum Skips to Arrive at Meeting On Time Array, Dynamic Programming β–Έ
Hard #1889 - Minimum Space Wasted From Packaging Array, Binary Search, Sorting, Prefix Sum β–Έ
Hard #3605 - Minimum Stability Factor of Array Array, Math, Binary Search, Greedy, Segment Tree, Number Theory β–Έ
Hard #3579 - Minimum Steps to Convert String with Operations String, Dynamic Programming, Greedy β–Έ
Hard #3117 - Minimum Sum of Values by Dividing Array Array, Binary Search, Dynamic Programming, Bit Manipulation, Segment Tree, Queue β–Έ
Hard #3785 - Minimum Swaps to Avoid Forbidden Values Array, Hash Table, Greedy, Counting β–Έ
Hard #801 - Minimum Swaps To Make Sequences Increasing Array, Dynamic Programming β–Έ
Hard #2589 - Minimum Time to Complete All Tasks Array, Binary Search, Stack, Greedy, Sorting β–Έ
Hard #2188 - Minimum Time to Finish the Race Array, Dynamic Programming β–Έ
Hard #2809 - Minimum Time to Make Array Sum At Most x Array, Dynamic Programming, Sorting β–Έ
Hard #2167 - Minimum Time to Remove All Cars Containing Illegal Goods String, Dynamic Programming β–Έ
Hard #3031 - Minimum Time to Revert Word to Initial State II String, Rolling Hash, String Matching, Hash Function β–Έ
Hard #3594 - Minimum Time to Transport All Individuals Array, Dynamic Programming, Bit Manipulation, Graph Theory, Heap (Priority Queue), Shortest Path, Bitmask β–Έ
Hard #2577 - Minimum Time to Visit a Cell In a Grid Array, Breadth-First Search, Graph Theory, Heap (Priority Queue), Matrix, Shortest Path β–Έ
Hard #2499 - Minimum Total Cost to Make Arrays Unequal Array, Hash Table, Greedy, Counting β–Έ
Hard #2463 - Minimum Total Distance Traveled Array, Dynamic Programming, Sorting β–Έ
Hard #2203 - Minimum Weighted Subgraph With the Required Paths Graph Theory, Heap (Priority Queue), Shortest Path β–Έ
Hard #3553 - Minimum Weighted Subgraph With the Required Paths II Array, Dynamic Programming, Bit Manipulation, Tree, Depth-First Search β–Έ
Hard #2209 - Minimum White Tiles After Covering With Carpets String, Dynamic Programming, Prefix Sum β–Έ
Hard #76 - Minimum Window Substring Hash Table, String, Sliding Window β–Έ
Hard #1879 - Minimum XOR Sum of Two Arrays Array, Dynamic Programming, Bit Manipulation, Bitmask β–Έ
Hard #2699 - Modify Graph Edge Weights Graph Theory, Heap (Priority Queue), Shortest Path β–Έ
Hard #3764 - Most Common Course Pairs General β–Έ
Hard MyCalendarIii β–Έ
Hard #51 - N-Queens Array, Backtracking β–Έ
Hard #52 - N-Queens II Backtracking β–Έ
Hard #2306 - Naming a Company Array, Hash Table, String, Bit Manipulation, Enumeration β–Έ
Hard #3620 - Network Recovery Pathways Array, Binary Search, Dynamic Programming, Graph Theory, Topological Sort, Heap (Priority Queue), Shortest Path β–Έ
Hard #2454 - Next Greater Element IV Array, Binary Search, Stack, Sorting, Heap (Priority Queue), Monotonic Stack β–Έ
Hard #3646 - Next Special Palindrome Number Backtracking, Bit Manipulation β–Έ
Hard NonNegativeIntegersWithoutConsecutiveOnes β–Έ
Hard #878 - Nth Magical Number Math, Binary Search β–Έ
Hard NumberOfAtoms β–Έ
Hard #3791 - Number of Balanced Integers in a Range Dynamic Programming β–Έ
Hard #2827 - Number of Beautiful Integers in the Range Math, Dynamic Programming β–Έ
Hard #2478 - Number of Beautiful Partitions String, Dynamic Programming, Prefix Sum β–Έ
Hard #1819 - Number of Different Subsequences GCDs Array, Math, Counting, Number Theory β–Έ
Hard #233 - Number of Digit One Math, Dynamic Programming, Recursion β–Έ
Hard #2318 - Number of Distinct Roll Sequences Dynamic Programming, Memoization β–Έ
Hard #3757 - Number of Effective Subsequences Array, Math, Dynamic Programming, Bit Manipulation, Combinatorics β–Έ
Hard #2354 - Number of Excellent Pairs Array, Hash Table, Binary Search, Bit Manipulation β–Έ
Hard #2251 - Number of Flowers in Full Bloom Array, Hash Table, Binary Search, Sorting, Prefix Sum, Ordered Set β–Έ
Hard #2421 - Number of Good Paths Array, Hash Table, Tree, Union-Find, Graph Theory, Sorting β–Έ
Hard #2518 - Number of Great Partitions Array, Dynamic Programming β–Έ
Hard #2328 - Number of Increasing Paths in a Grid Array, Dynamic Programming, Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort, Memoization, Matrix β–Έ
Hard #3621 - Number of Integers With Popcount-Depth Equal to K I Math, Dynamic Programming, Bit Manipulation, Combinatorics β–Έ
Hard #3624 - Number of Integers With Popcount-Depth Equal to K II Array, Divide and Conquer, Binary Indexed Tree, Segment Tree β–Έ
Hard #920 - Number of Music Playlists Math, Dynamic Programming, Combinatorics β–Έ
Hard #2426 - Number of Pairs Satisfying Inequality Array, Binary Search, Divide and Conquer, Binary Indexed Tree, Segment Tree, Merge Sort, Ordered Set β–Έ
Hard #1301 - Number of Paths with Max Score Array, Dynamic Programming, Matrix β–Έ
Hard #2959 - Number of Possible Sets of Closing Branches Bit Manipulation, Graph Theory, Heap (Priority Queue), Enumeration, Shortest Path β–Έ
Hard #996 - Number of Squareful Arrays Array, Hash Table, Math, Dynamic Programming, Backtracking, Bit Manipulation, Bitmask β–Έ
Hard #3686 - Number of Stable Subsequences Array, Dynamic Programming β–Έ
Hard #3036 - Number of Subarrays That Match a Pattern II Array, Rolling Hash, String Matching, Hash Function β–Έ
Hard #3209 - Number of Subarrays With AND Value of K Array, Binary Search, Bit Manipulation, Segment Tree β–Έ
Hard #1074 - Number of Submatrices That Sum to Target Array, Hash Table, Matrix, Prefix Sum β–Έ
Hard #1987 - Number of Unique Good Subsequences String, Dynamic Programming β–Έ
Hard #2056 - Number of Valid Move Combinations On Chessboard Array, String, Backtracking, Simulation β–Έ
Hard #1178 - Number of Valid Words for Each Puzzle Array, Hash Table, String, Bit Manipulation, Trie β–Έ
Hard #1944 - Number of Visible People in a Queue Array, Stack, Monotonic Stack β–Έ
Hard #1444 - Number of Ways of Cutting a Pizza Array, Dynamic Programming, Memoization, Matrix, Prefix Sum β–Έ
Hard #3559 - Number of Ways to Assign Edge Weights II Array, Math, Dynamic Programming, Bit Manipulation, Tree, Depth-First Search β–Έ
Hard #2147 - Number of Ways to Divide a Long Corridor Math, String, Dynamic Programming β–Έ
Hard #2585 - Number of Ways to Earn Points Array, Dynamic Programming β–Έ
Hard #1639 - Number of Ways to Form a Target String Given a Dictionary Array, String, Dynamic Programming β–Έ
Hard #1411 - Number of Ways to Paint N Γ— 3 Grid Dynamic Programming β–Έ
Hard #1866 - Number of Ways to Rearrange Sticks With K Sticks Visible Math, Dynamic Programming, Combinatorics β–Έ
Hard #1719 - Number Of Ways To Reconstruct A Tree Array, Hash Table, Tree, Graph Theory, Simulation β–Έ
Hard #1569 - Number of Ways to Reorder Array to Get Same BST Array, Math, Divide and Conquer, Dynamic Programming, Tree, Union-Find, Binary Search Tree, Memoization, Combinatorics, Binary Tree β–Έ
Hard #1977 - Number of Ways to Separate Numbers String, Dynamic Programming, Suffix Array β–Έ
Hard #1269 - Number of Ways to Stay in the Same Place After Some Steps Dynamic Programming β–Έ
Hard #1434 - Number of Ways to Wear Different Hats to Each Other Array, Dynamic Programming, Bit Manipulation, Bitmask β–Έ
Hard #3699 - Number of ZigZag Arrays I Dynamic Programming, Prefix Sum β–Έ
Hard #3700 - Number of ZigZag Arrays II Math, Dynamic Programming β–Έ
Hard #902 - Numbers At Most N Given Digit Set Array, Math, String, Binary Search, Dynamic Programming β–Έ
Hard #1012 - Numbers With Repeated Digits Math, Dynamic Programming β–Έ
Hard #975 - Odd Even Jump Array, Dynamic Programming, Stack, Sorting, Monotonic Stack, Ordered Set β–Έ
Hard #1157 - Online Majority Element In Subarray Array, Binary Search, Design, Binary Indexed Tree, Segment Tree β–Έ
Hard #899 - Orderly Queue Math, String, Sorting β–Έ
Hard P24Game β–Έ
Hard #1473 - Paint House III Array, Dynamic Programming β–Έ
Hard #1931 - Painting a Grid With Three Different Colors Dynamic Programming β–Έ
Hard #2742 - Painting the Walls Array, Dynamic Programming β–Έ
Hard #336 - Palindrome Pairs Array, Hash Table, String, Trie β–Έ
Hard #132 - Palindrome Partitioning II String, Dynamic Programming β–Έ
Hard #1278 - Palindrome Partitioning III String, Dynamic Programming β–Έ
Hard #1745 - Palindrome Partitioning IV String, Dynamic Programming β–Έ
Hard #2983 - Palindrome Rearrangement Queries Hash Table, String, Prefix Sum β–Έ
Hard #3841 - Palindromic Path Queries in a Tree Array, String, Divide and Conquer, Tree, Segment Tree β–Έ
Hard #1494 - Parallel Courses II Dynamic Programming, Bit Manipulation, Graph Theory, Bitmask β–Έ
Hard #2050 - Parallel Courses III Array, Dynamic Programming, Graph Theory, Topological Sort β–Έ
Hard ParseLispExpression β–Έ
Hard #1106 - Parsing A Boolean Expression String, Stack, Recursion β–Έ
Hard #3630 - Partition Array for Maximum XOR and AND Array, Math, Greedy, Bit Manipulation, Enumeration β–Έ
Hard #2035 - Partition Array Into Two Arrays to Minimize Sum Difference Array, Two Pointers, Binary Search, Dynamic Programming, Bit Manipulation, Sorting, Ordered Set, Bitmask β–Έ
Hard #330 - Patching Array Array, Greedy β–Έ
Hard #3534 - Path Existence Queries in a Graph II Array, Two Pointers, Binary Search, Dynamic Programming, Greedy, Bit Manipulation, Graph Theory, Sorting β–Έ
Hard #2435 - Paths in Matrix Whose Sum Is Divisible by K Array, Dynamic Programming, Matrix β–Έ
Hard #3187 - Peaks in Array Array, Binary Indexed Tree, Segment Tree β–Έ
Hard #391 - Perfect Rectangle Array, Hash Table, Math, Geometry, Sweep Line β–Έ
Hard #60 - Permutation Sequence Math, Recursion β–Έ
Hard #3470 - Permutations IV Array, Math, Combinatorics, Enumeration β–Έ
Hard #1388 - Pizza With 3n Slices Array, Dynamic Programming, Greedy, Heap (Priority Queue) β–Έ
Hard PoorPigs β–Έ
Hard #2681 - Power of Heroes Array, Math, Dynamic Programming, Sorting, Prefix Sum β–Έ
Hard PrefixAndSuffixSearch β–Έ
Hard PreimageSizeOfFactorialZeroesFunction β–Έ
Hard #1467 - Probability of a Two Boxes Having The Same Number of Distinct Balls Array, Math, Dynamic Programming, Backtracking, Combinatorics, Probability and Statistics β–Έ
Hard #2076 - Process Restricted Friend Requests Union-Find, Graph Theory β–Έ
Hard #3614 - Process String with Special Operations II String, Simulation β–Έ
Hard #879 - Profitable Schemes Array, Dynamic Programming β–Έ
Hard #2551 - Put Marbles in Bags Array, Greedy, Sorting, Heap (Priority Queue) β–Έ
Hard #818 - Race Car Dynamic Programming β–Έ
Hard RandomPickWithBlacklist β–Έ
Hard RangeModule β–Έ
Hard #1632 - Rank Transform of a Matrix Array, Union-Find, Graph Theory, Topological Sort, Sorting, Matrix β–Έ
Hard #882 - Reachable Nodes In Subdivided Graph Graph Theory, Heap (Priority Queue), Shortest Path β–Έ
Hard ReachingPoints β–Έ
Hard #2561 - Rearranging Fruits Array, Hash Table, Greedy, Sort β–Έ
Hard #332 - Reconstruct Itinerary Array, String, Depth-First Search, Graph Theory, Sorting, Heap (Priority Queue), Eulerian Circuit β–Έ
Hard #1028 - Recover a Tree From Preorder Traversal String, Tree, Depth-First Search, Binary Tree β–Έ
Hard #2122 - Recover the Original Array Array, Hash Table, Two Pointers, Sorting, Enumeration β–Έ
Hard #850 - Rectangle Area II Array, Segment Tree, Sweep Line, Ordered Set β–Έ
Hard #1402 - Reducing Dishes Array, Dynamic Programming, Greedy, Sorting β–Έ
Hard RedundantConnectionIi β–Έ
Hard #10 - Regular Expression Matching String, Dynamic Programming, Recursion β–Έ
Hard RemoveBoxes β–Έ
Hard #301 - Remove Invalid Parentheses String, Backtracking, Breadth-First Search β–Έ
Hard #1579 - Remove Max Number of Edges to Keep Graph Fully Traversable Union-Find, Graph Theory β–Έ
Hard #2197 - Replace Non-Coprime Numbers in Array Array, Math, Stack, Number Theory β–Έ
Hard #1416 - Restore The Array String, Dynamic Programming β–Έ
Hard #25 - Reverse Nodes in k-Group Linked List, Recursion β–Έ
Hard ReversePairs β–Έ
Hard #1330 - Reverse Subarray To Maximize Array Value Array, Math, Greedy β–Έ
Hard #2751 - Robot Collisions Array, Stack, Sorting, Simulation β–Έ
Hard #354 - Russian Doll Envelopes Array, Binary Search, Dynamic Programming, Sorting β–Έ
Hard #87 - Scramble String String, Dynamic Programming β–Έ
Hard #2045 - Second Minimum Time to Reach Destination Breadth-First Search, Graph Theory, Shortest Path β–Έ
Hard #3276 - Select Cells in Grid With Maximum Score Array, Dynamic Programming, Bit Manipulation, Matrix, Bitmask β–Έ
Hard #335 - Self Crossing Array, Math, Geometry β–Έ
Hard #2312 - Selling Pieces of Wood Array, Dynamic Programming, Memoization β–Έ
Hard #3454 - Separate Squares II Array, Binary Search, Segment Tree, Sweep Line β–Έ
Hard #2102 - Sequentially Ordinal Rank Tracker Design, Heap (Priority Queue), Data Stream, Ordered Set β–Έ
Hard #297 - Serialize and Deserialize Binary Tree String, Tree, Depth-First Search, Breadth-First Search, Design, Binary Tree β–Έ
Hard SetIntersectionSizeAtLeastTwo β–Έ
Hard #1092 - Shortest Common Supersequence String, Dynamic Programming β–Έ
Hard #2608 - Shortest Cycle in a Graph Breadth-First Search, Graph Theory β–Έ
Hard #3244 - Shortest Distance After Road Addition Queries II Array, Greedy, Graph Theory, Ordered Set β–Έ
Hard #2350 - Shortest Impossible Sequence of Rolls Array, Hash Table, Greedy β–Έ
Hard #3455 - Shortest Matching Substring Two Pointers, String, Binary Search, String Matching β–Έ
Hard #214 - Shortest Palindrome String, Rolling Hash, String Matching, Hash Function β–Έ
Hard #1293 - Shortest Path in a Grid with Obstacles Elimination Array, Breadth-First Search, Matrix β–Έ
Hard #3515 - Shortest Path in a Weighted Tree Array, Tree, Depth-First Search, Binary Indexed Tree, Segment Tree β–Έ
Hard #864 - Shortest Path to Get All Keys Array, Bit Manipulation, Breadth-First Search, Matrix β–Έ
Hard #847 - Shortest Path Visiting All Nodes Dynamic Programming, Bit Manipulation, Breadth-First Search, Graph Theory, Bitmask β–Έ
Hard #862 - Shortest Subarray with Sum at Least K Array, Binary Search, Queue, Sliding Window, Heap (Priority Queue), Prefix Sum, Monotonic Queue β–Έ
Hard #839 - Similar String Groups Array, Hash Table, String, Depth-First Search, Breadth-First Search, Union-Find β–Έ
Hard SlidingPuzzle β–Έ
Hard #239 - Sliding Window Maximum Array, Queue, Sliding Window, Heap (Priority Queue), Monotonic Queue β–Έ
Hard SlidingWindowMedian β–Έ
Hard #3348 - Smallest Divisible Digit Product II Math, String, Backtracking, Greedy, Number Theory β–Έ
Hard SmallestGoodBase β–Έ
Hard #2030 - Smallest K-Length Subsequence With Occurrences of a Letter String, Stack, Greedy, Monotonic Stack β–Έ
Hard #2003 - Smallest Missing Genetic Value in Each Subtree Array, Dynamic Programming, Tree, Depth-First Search, Union-Find β–Έ
Hard #3518 - Smallest Palindromic Rearrangement II Hash Table, Math, String, Combinatorics, Counting β–Έ
Hard SmallestRangeCoveringElementsFromKLists β–Έ
Hard SmallestRotationWithHighestScore β–Έ
Hard #3398 - Smallest Substring With Identical Characters I Array, Binary Search, Enumeration β–Έ
Hard #3399 - Smallest Substring With Identical Characters II String, Binary Search β–Έ
Hard #1125 - Smallest Sufficient Team Array, Dynamic Programming, Bit Manipulation, Bitmask β–Έ
Hard #1203 - Sort Items by Groups Respecting Dependencies Depth-First Search, Breadth-First Search, Graph Theory, Topological Sort β–Έ
Hard #3312 - Sorted GCD Pair Queries Array, Hash Table, Math, Binary Search, Combinatorics, Counting, Number Theory, Prefix Sum β–Έ
Hard SpecialBinaryString β–Έ
Hard SplitArrayLargestSum β–Έ
Hard #805 - Split Array With Same Average Array, Hash Table, Math, Dynamic Programming, Bit Manipulation, Bitmask β–Έ
Hard #2468 - Split Message Based on Limit String, Enumeration β–Έ
Hard #2584 - Split the Array to Make Coprime Products Array, Hash Table, Math, Number Theory β–Έ
Hard #2132 - Stamping the Grid Array, Greedy, Matrix, Prefix Sum β–Έ
Hard #936 - Stamping The Sequence String, Stack, Greedy, Queue β–Έ
Hard StickersToSpellWord β–Έ
Hard #1406 - Stone Game III Array, Math, Dynamic Programming, Game Theory β–Έ
Hard #1510 - Stone Game IV Math, Dynamic Programming, Game Theory β–Έ
Hard #1563 - Stone Game V Array, Math, Dynamic Programming, Game Theory β–Έ
Hard #1872 - Stone Game VIII Array, Math, Dynamic Programming, Prefix Sum, Game Theory β–Έ
Hard StrangePrinter β–Έ
Hard #1591 - Strange Printer II Array, Graph Theory, Topological Sort, Matrix β–Έ
Hard #1032 - Stream of Characters Array, String, Design, Trie, Data Stream β–Έ
Hard #1531 - String Compression II String, Dynamic Programming β–Έ
Hard #2851 - String Transformation Math, String, Dynamic Programming, String Matching β–Έ
Hard StrongPasswordChecker β–Έ
Hard StudentAttendanceRecordIi β–Έ
Hard #2334 - Subarray With Elements Greater Than Varying Threshold Array, Stack, Union-Find, Monotonic Stack β–Έ
Hard #2916 - Subarrays Distinct Element Sum of Squares II Array, Dynamic Programming, Binary Indexed Tree, Segment Tree β–Έ
Hard #992 - Subarrays with K Different Integers Array, Hash Table, Sliding Window, Counting β–Έ
Hard #2565 - Subsequence With the Minimum Score Two Pointers, String, Binary Search β–Έ
Hard #3395 - Subsequences with a Unique Middle Mode I Array, Hash Table, Math, Combinatorics β–Έ
Hard #30 - Substring with Concatenation of All Words Hash Table, String, Sliding Window β–Έ
Hard #2272 - Substring With Largest Variance Hash Table, String, Dynamic Programming, Enumeration β–Έ
Hard #3544 - Subtree Inversion Sum Array, Dynamic Programming, Tree, Depth-First Search β–Έ
Hard #37 - Sudoku Solver Array, Hash Table, Backtracking, Matrix β–Έ
Hard #3671 - Sum of Beautiful Subsequences Array, Math, Binary Indexed Tree, Number Theory β–Έ
Hard #834 - Sum of Distances in Tree Dynamic Programming, Tree, Depth-First Search, Graph Theory β–Έ
Hard #1862 - Sum of Floored Pairs Array, Math, Binary Search, Counting, Enumeration, Prefix Sum β–Έ
Hard #3351 - Sum of Good Subsequences Array, Hash Table, Dynamic Programming β–Έ
Hard #2763 - Sum of Imbalance Numbers of All Subarrays Array, Hash Table, Enumeration β–Έ
Hard #3855 - Sum of K-Digit Numbers in a Range General β–Έ
Hard #2081 - Sum of k-Mirror Numbers Math, Enumeration β–Έ
Hard #3715 - Sum of Perfect Square Ancestors Array, Hash Table, Math, Tree, Depth-First Search, Counting, Number Theory β–Έ
Hard #2416 - Sum of Prefix Scores of Strings Array, String, Trie, Counting β–Έ
Hard #2223 - Sum of Scores of Built Strings String, Binary Search, Rolling Hash, Suffix Array, String Matching, Hash Function β–Έ
Hard #891 - Sum of Subsequence Widths Array, Math, Sorting β–Έ
Hard #2281 - Sum of Total Strength of Wizards Array, Stack, Monotonic Stack, Prefix Sum β–Έ
Hard #887 - Super Egg Drop Math, Binary Search, Dynamic Programming β–Έ
Hard #906 - Super Palindromes Math, String, Enumeration β–Έ
Hard SuperWashingMachines β–Έ
Hard SwimInRisingWater β–Έ
Hard TagValidator β–Έ
Hard #956 - Tallest Billboard Array, Dynamic Programming β–Έ
Hard #68 - Text Justification Array, String, Simulation β–Έ
Hard #1900 - The Earliest and Latest Rounds Where Players Compete Dynamic Programming, Memoization β–Έ
Hard #1994 - The Number of Good Subsets Array, Hash Table, Math, Dynamic Programming, Bit Manipulation, Counting, Number Theory, Bitmask β–Έ
Hard #2019 - The Score of Students Solving Math Expression Array, Hash Table, Math, String, Dynamic Programming, Stack, Memoization β–Έ
Hard #218 - The Skyline Problem Array, Divide and Conquer, Binary Indexed Tree, Segment Tree, Sweep Line, Sorting, Heap (Priority Queue), Ordered Set β–Έ
Hard #927 - Three Equal Parts Array, Math β–Έ
Hard #3636 - Threshold Majority Queries Array, Hash Table, Binary Search, Divide and Conquer, Counting, Prefix Sum β–Έ
Hard #1240 - Tiling a Rectangle with the Fewest Squares Backtracking β–Έ
Hard #3241 - Time Taken to Mark All Nodes Dynamic Programming, Tree, Depth-First Search, Graph Theory β–Έ
Hard #2532 - Time to Cross a Bridge Array, Heap (Priority Queue), Simulation β–Έ
Hard #2262 - Total Appeal of A String Hash Table, String, Dynamic Programming β–Έ
Hard #3337 - Total Characters in String After Transformations II Hash Table, Math, String, Dynamic Programming, Counting β–Έ
Hard #3786 - Total Sum of Interaction Cost in Tree Groups Array, Tree, Depth-First Search β–Έ
Hard #3753 - Total Waviness of Numbers in Range II Math, Dynamic Programming β–Έ
Hard TransformToChessboard β–Έ
Hard #42 - Trapping Rain Water Array, Two Pointers, Dynamic Programming, Stack, Monotonic Stack β–Έ
Hard TrappingRainWaterIi β–Έ
Hard #1766 - Tree of Coprimes Array, Math, Tree, Depth-First Search, Number Theory β–Έ
Hard #3640 - Trionic Array II Array, Dynamic Programming β–Έ
Hard #982 - Triples with Bitwise AND Equal To Zero Array, Hash Table, Bit Manipulation β–Έ
Hard #262 - Trips and Users Database β–Έ
Hard #980 - Unique Paths III Array, Backtracking, Bit Manipulation, Matrix β–Έ
Hard #2097 - Valid Arrangement of Pairs Array, Depth-First Search, Graph Theory, Eulerian Circuit β–Έ
Hard #65 - Valid Number String β–Έ
Hard #903 - Valid Permutations for DI Sequence String, Dynamic Programming, Prefix Sum β–Έ
Hard #1307 - Verbal Arithmetic Puzzle Array, Math, String, Backtracking β–Έ
Hard #987 - Vertical Order Traversal of a Binary Tree Hash Table, Tree, Depth-First Search, Breadth-First Search, Sorting, Binary Tree β–Έ
Hard #44 - Wildcard Matching String, Dynamic Programming, Greedy, Recursion β–Έ
Hard #140 - Word Break II Array, Hash Table, String, Dynamic Programming, Backtracking, Trie, Memoization β–Έ
Hard #127 - Word Ladder Hash Table, String, Breadth-First Search β–Έ
Hard #126 - Word Ladder II Hash Table, String, Backtracking, Breadth-First Search β–Έ
Hard #212 - Word Search II Array, String, Backtracking, Trie, Matrix β–Έ
Hard #3655 - XOR After Range Multiplication Queries II Array, Divide and Conquer β–Έ
Hard ZumaGame β–Έ