Skip to content

Latest commit

History

839 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Project - LeetCode

OrderTitleSolutionDifficulty
0001Two SumPython3Easy
0002Add Two NumbersPython3Medium
0003longest-substring-without-repeating-charactersPython3Medium
0004Median of Two Sorted ArraysPython3Hard
0005Longest Palindromic SubstringPython3Medium
0006Zigzag ConversionPython3Medium
0007Reverse IntegerPython3Medium
0008String to Integer (atoi)Python3Medium
0009Palindrome NumberPython3Easy
0011Container With Most WaterPython3Medium
0012Integer to RomanPython3Medium
0013Roman to IntegerPython3Easy
0014Longest Common PrefixPython3Easy
00153SumPython3Medium
0017Letter Combinations of a Phone NumberPython3Medium
0019Remove Nth Node From End of ListPython3Medium
0020Valid ParenthesesPython3Easy
0021Merge Two Sorted ListsPython3Easy
0023Merge k Sorted ListsPython3Hard
0024Swap Nodes in PairsPython3Medium
0026Remove Duplicates from Sorted ArrayPython3Easy
0027Remove ElementPython3Easy
0028Find the Index of the First Occurrence in a StringPython3Easy
0029Divide Two IntegersPython3Medium
0030Substring with Concatenation of All WordsPython3Hard
0031Next PermutationPython3Medium
0034Find First and Last Position of Element in Sorted ArrayPython3Medium
00350035_Search_Insert_PositionPython3Easy
0036Valid SudokuPython3Medium
0038Count and SayPython3Medium
0039Combination SumPython3Medium
0042First Missing PositivePython3Hard
0042Trapping Rain WaterPython3Hard
0045Jump Game IIPython3Medium
0046PermutationsPython3Medium
0048Rotate ImagePython3Medium
0049Group AnagramsPython3Medium
0050Pow(x, n)Python3Medium
0054Spiral MatrixPython3Medium
0055Jump GamePython3Medium
0056Merge IntervalsPython3Medium
0057Insert IntervalPython3Medium
0058Length of Last WordPython3Easy
0059Spiral Matrix IIPython3Medium
0061Rotate ListPython3Medium
0062Unique PathsPython3Medium
0063Unique Paths IIPython3Medium
0064Minimum Path SumPython3Medium
0065Valid NumberPython3Hard
0066Plus OnePython3Easy
0067Add BinaryPython3Easy
0068Text JustificationPython3Hard
0069Sqrt(x)Python3Easy
0070Climbing StairsPython3Easy
0071Simplify PathPython3Medium
0073Set Matrix ZeroesPython3Medium
0074Search a 2D MatrixPython3Medium
0077CombinationsPython3Medium
0079Word SearchPython3Medium
0080Remove Duplicates from Sorted Array IIPython3Medium
0082Remove Duplicates from Sorted List IIPython3Medium
0083Remove Duplicates from Sorted ListPython3Easy
0086Partition ListPython3Medium
0088Merge Sorted ArrayPython3Easy
0092Reverse Linked List IIPython3Medium
0098Validate Binary Search TreePython3Medium
0100Same TreePython3Easy
0101Symmetric TreePython3Easy
0102Binary Tree Level Order TraversalPython3Medium
0103Binary Tree Zigzag Level Order TraversalPython3Medium
0105Construct Binary Tree from Preorder and Inorder TraversalPython3Medium
0106Construct Binary Tree from Inorder and Postorder TraversalPython3Medium
0108Convert Sorted Array to Binary Search TreePython3Easy
0110Balanced Binary TreePython3Easy
0111Minimum Depth of Binary TreePython3Easy
0112Path SumPython3Easy
0114Flatten Binary Tree to Linked ListPython3Medium
0117Populating Next Right Pointers in Each Node IIPython3Medium
0118Pascal's TrianglePython3Easy
0120TrianglePython3Medium
0121Best Time to Buy and Sell StockPython3Easy
0122Best Time to Buy and Sell Stock IIPython3Medium
0124Binary Tree Maximum Path SumPython3Hard
0125Valid PalindromePython3Easy
0127Word LadderPython3Hard
0128Longest Consecutive SequencePython3Medium
0129Sum Root to Leaf NumbersPython3Medium
0130Surrounded RegionsPython3Medium
0133Clone GraphPython3Medium
0134Gas StationPython3Medium
0135CandyPython3Hard
0136Single NumberPython3Easy
0136Copy List with Random PointerPython3Medium
0141Linked List CyclePython3Easy
0143Reorder ListPython3Medium
0144Binary Tree Preorder TraversalPython3Easy
0146LRU CachePython3Medium
0148Sort ListPython3Medium
0150Evaluate Reverse Polish NotationPython3Medium
0151Reverse Words in a StringPython3Medium
0155Min StackPython3Medium
0157Read N Characters Given Read4Python3Easy
0162Find Peak ElementPython3Medium
0163Missing RangesPython3Easy
0166Fraction to Recurring DecimalPython3Medium
0167Two Sum II - Input Array Is SortedPython3Medium
0172Factorial Trailing ZeroesPython3Medium
0173Binary Search Tree IteratorPython3Medium
0190Reverse BitsPython3Easy
0191Number of 1 BitsPython3Easy
0198House RobberPython3Medium
0199Binary Tree Right Side ViewPython3Medium
0200Number of IslandsPython3Medium
0202Happy NumberPython3Easy
0205Isomorphic StringsPython3Easy
0206Reverse Linked ListPython3Easy
0208Implement Trie (Prefix Tree)Python3Medium
0209Minimum Size Subarray SumPython3Medium
0215Kth Largest Element in an ArrayPython3Medium
0217Contains DuplicatePython3Easy
0219Contains Duplicate IIPython3Easy
0222Count Complete Tree NodesPython3Easy
0226Invert Binary TreePython3Easy
0227Basic Calculator IIPython3Medium
0228Summary RangesPython3Easy
0230Kth Smallest Element in a BSTPython3Medium
0232Implement Queue using StacksPython3Easy
0234Palindrome Linked ListPython3Easy
0236Lowest Common Ancestor of a Binary TreePython3Medium
0238Product of Array Except SelfPython3Medium
0242Valid AnagramPython3Easy
0246Strobogrammatic NumberPython3Easy
0249Group Shifted StringsPython3Medium
0253Meeting Rooms IIPython3Medium
0266Palindrome PermutationPython3Easy
0268Missing NumberPython3Easy
0270Closest Binary Search Tree ValuePython3Easy
0274H-IndexPython3Medium
0277Find the CelebrityPython3Medium
0279Perfect SquaresPython3Medium
0282Expression Add OperatorsPython3Hard
0283Move ZeroesPython3Easy
0287Find the Duplicate NumberPython3Medium
0290Word PatternPython3Medium
0300Longest Increasing SubsequencePython3Medium
0303Range Sum Query - ImmutablePython3Easy
0304Range Sum Query 2D - ImmutablePython3Medium
0314Binary Tree Vertical Order TraversalPython3Medium
0319Bulb SwitcherPython3Medium
0322Coin ChangePython3Medium
0325Maximum Size Subarray Sum Equals kPython3Medium
0339Nested List Weight SumPython3Medium
0340Longest Substring with At Most K Distinct CharactersPython3Medium
0345Reverse Vowels of a StringPython3Easy
0346Moving Average from Data StreamPython3Easy
0347Top K Frequent ElementsPython3Medium
0348Design Tic-Tac-ToePython3Medium
0349Intersection of Two ArraysPython3Easy
0350Intersection of Two Arrays IIPython3Easy
0364Nested List Weight Sum IIPython3Medium
0378Nested List Weight Sum IIPython3Medium
0380Insert Delete GetRandom O(1)Python3Medium
0386Lexicographical NumbersPython3Medium
0387First Unique Character in a StringPython3Easy
0389Find the DifferencePython3Easy
0398Random Pick IndexPython3Medium
0399Evaluate DivisionPython3Medium
0407Trapping Rain Water IIPython3Hard
0408Valid Word AbbreviationPython3Easy
0414Third Maximum NumberPython3Easy
0417Pacific Atlantic Water FlowPython3Medium
0426Convert Binary Search Tree to Sorted Doubly Linked ListPython3Medium
0433Minimum Genetic MutationPython3Medium
0440K-th Smallest in Lexicographical OrderPython3Hard
0442Find All Duplicates in an ArrayPython3Medium
0443String CompressionPython3Medium
0451String CompressionPython3Medium
0451Minimum Number of Arrows to Burst BalloonsPython3Medium
0455Arithmetic Slices II - SubsequencePython3Hard
0455Assign CookiesPython3Easy
0459Repeated Substring PatternPython3Easy
0463Island PerimeterPython3Easy
0494Target SumPython3Medium
0498Diagonal TraversePython3Medium
0501Repeated Substring PatternPython3Easy
0513Find Bottom Left Tree ValuePython3Medium
0515Find Largest Value in Each Tree RowPython3Medium
0523Continuous Subarray SumPython3Medium
0525Contiguous ArrayPython3Medium
0528Random Pick with WeightPython3Medium
0530Minimum Absolute Difference in BSTPython3Easy
0543Diameter of Binary TreePython3Easy
0551Student Attendance Record IPython3Easy
0560Subarray Sum Equals KPython3Medium
0567Permutation in StringPython3Medium
0572Subtree of Another TreePython3Easy
0605Can Place FlowersPython3Easy
0621Task SchedulerPython3Medium
0632Smallest Range Covering Elements from K ListsPython3Hard
0645Set MismatchPython3Easy
0653Two Sum IV - Input is a BSTPython3Easy
0658Find K Closest ElementsPython3Medium
0670Maximum SwapPython3Medium
0674Longest Continuous Increasing SubsequencePython3Easy
0678Valid Parenthesis StringPython3Medium
0680Valid Palindrome IIPython3Easy
0684Redundant ConnectionPython3Medium
0689Maximum Sum of 3 Non-Overlapping SubarraysPython3Hard
0703Kth Largest Element in a StreamPython3Easy
0708Insert into a Sorted Circular Linked ListPython3Medium
0713Subarray Product Less Than KPython3Medium
0721Accounts MergePython3Medium
0727Minimum Window SubsequencePython3Hard
0739Network Delay TimePython3Medium
0743Network Delay TimePython3Medium
0766Toeplitz MatrixPython3Easy
0767Reorganize StringPython3Medium
0769Max Chunks To Make SortedPython3Medium
0773Sliding PuzzlePython3Hard
0785Is Graph Bipartite?Python3Medium
0791Custom Sort StringPython3Medium
0796Rotate StringPython3Easy
0802Find Eventual Safe StatesPython3Medium
0824Goat LatinPython3Easy
0827Making A Large IslandPython3Hard
0838Push DominoesPython3Medium
0852Peak Index in a Mountain ArrayPython3Medium
0859Buddy StringsPython3Easy
0863Shortest Subarray with Sum at Least KPython3Hard
0863All Nodes Distance K in Binary TreePython3Medium
0865Smallest Subtree with all the Deepest NodesPython3Medium
0872Leaf-Similar TreesPython3Easy
0876Middle of the Linked ListPython3Easy
0916Word SubsetsPython3Medium
0921Minimum Add to Make Parentheses ValidPython3Medium
0930Binary Subarrays With SumPython3Medium
0931Minimum Falling Path SumPython3Medium
0938Range Sum of BSTPython3Easy
0948Bag of TokensPython3Medium
0950Reveal Cards In Increasing OrderPython3Medium
0951Flip Equivalent Binary TreesPython3Medium
0953Verifying an Alien DictionaryPython3Easy
0957Prison Cells After N DaysPython3Medium
0957Check Completeness of a Binary TreePython3Medium
0973K Closest Points to OriginPython3Medium
0977Squares of a Sorted ArrayPython3Easy
0983Minimum Cost For TicketsPython3Medium
0986Interval List IntersectionsPython3Medium
0987Vertical Order Traversal of a Binary TreePython3Hard
0992Subarrays with K Different IntegersPython3Hard
0994Rotting OrangesPython3Medium
1004Max Consecutive Ones IIIPython3Medium
1014Best Sightseeing PairPython3Medium
1026Maximum Difference Between Node and AncestorPython3Medium
1027Longest Arithmetic SubsequencePython3Medium
1035Uncrossed LinesPython3Medium
1047Remove All Adjacent Duplicates In StringPython3Easy
1060Missing Element in Sorted ArrayPython3Medium
1061Lexicographically Smallest Equivalent StringPython3Medium
1072Flip Columns For Maximum Number of Equal RowsPython3Medium
1074Number of Submatrices That Sum to TargetPython3Hard
1091Shortest Path in Binary MatrixPython3Medium
1100Find K-Length Substrings With No Repeated CharactersPython3Medium
1106Parsing A Boolean ExpressionPython3Hard
1119Remove Vowels from a StringPython3Easy
1129Shortest Path with Alternating ColorsPython3Medium
1137N-th Tribonacci NumberPython3Medium
1151Minimum Swaps to Group All 1's TogetherPython3Medium
1171Remove Zero Sum Consecutive Nodes from Linked ListPython3Medium
1176Diet Plan PerformancePython3Easy
1207Unique Number of OccurrencesPython3Easy
1213Intersection of Three Sorted ArraysPython3Easy
1216Valid Palindrome IIIPython3Hard
1235Maximum Profit in Job SchedulingPython3Hard
1249Minimum Remove to Make Valid ParenthesesPython3Medium
1266Minimum Time Visiting All PointsPython3Easy
1267Count Servers that CommunicatePython3Medium
1291Sequential DigitsPython3Medium
1329Sort the Matrix DiagonallyPython3Medium
1331Rank Transform of an ArrayPython3Easy
1335Minimum Difficulty of a Job SchedulePython3Hard
1346Check If N and Its Double ExistPython3Easy
1352Product of the Last K NumbersPython3Medium
1358Number of Substrings Containing All Three CharactersPython3Medium
1368Minimum Cost to Make at Least One Valid Path in a GridPython3Hard
1400Construct K Palindrome StringsPython3Medium
1408String Matching in an ArrayPython3Easy
1422Maximum Score After Splitting a StringPython3Easy
1424Diagonal Traverse IIPython3Medium
1427Perform String ShiftsPython3Easy
1432Max Difference You Can Get From Changing an IntegerPython3Medium
1436Destination CityPython3Easy
1443Minimum Time to Collect All Apples in a TreePython3Medium
1455Check If a Word Occurs As a Prefix of Any Word in a SentencePython3Easy
1462Course Schedule IVPython3Medium
1469Find All The Lonely NodesPython3Easy
1492The kth Factor of nPython3Medium
1528Shuffle StringPython3Easy
1539Kth Missing Positive NumberPython3Easy
1544Make The String GreatPython3Easy
1545Find Kth Bit in Nth Binary StringPython3Medium
1570Dot Product of Two Sparse VectorsPython3Medium
1574Shortest Subarray to be Removed to Make Array SortedPython3Medium
1578Minimum Time to Make Rope ColorfulPython3Medium
1609Even Odd TreePython3Medium
1614Maximum Nesting Depth of the ParenthesesPython3Easy
1629Slowest KeyPython3Easy
1639Number of Ways to Form a Target String Given a DictionaryPython3Hard
1644Lowest Common Ancestor of a Binary Tree IIPython3Medium
1650Lowest Common Ancestor of a Binary Tree IIIPython3Medium
1652Defuse the BombPython3Easy
1662Check If Two String Arrays are EquivalentPython3Easy
1669Merge In Between Linked ListsPython3Medium
1700Number of Students Unable to Eat LunchPython3Easy
1704Determine if String Halves Are AlikePython3Easy
1726Tuple with Same ProductPython3Medium
1730Shortest Path to Get FoodPython3Medium
1750Minimum Length of String After Deleting Similar EndsPython3Medium
1752Check if Array Is Sorted and RotatedPython3Easy
1760Minimum Limit of Balls in a BagPython3Medium
1762Buildings With an Ocean ViewPython3Medium
1765Map of Highest PeakPython3Medium
1768Merge Strings AlternatelyPython3Easy
1769Minimum Number of Operations to Move All Balls to Each BoxPython3Medium
1790Check if One String Swap Can Make Strings EqualPython3Easy
1791Find Center of Star GraphPython3Easy
1792Maximum Average Pass RatioPython3Meidum
1800Maximum Ascending Subarray SumPython3Easy
1829Maximum XOR for Each QueryPython3Meidum
1852Distinct Numbers in Each SubarrayPython3Meidum
1861Rotating the BoxPython3Meidum
1891Cutting RibbonsPython3Meidum
1897Redistribute Characters to Make All Strings EqualPython3Easy
1930Unique Length-3 Palindromic SubsequencesPython3Meidum
1942The Number of the Smallest Unoccupied ChairPython3Meidum
1957Delete Characters to Make Fancy StringPython3Easy
1963Minimum Number of Swaps to Make the String BalancedPython3Meidum
1975Maximum Matrix SumPython3Meidum
2016Maximum Difference Between Increasing ElementsPython3Easy
2017Grid GamePython3Meidum
2054Two Best Non-Overlapping EventsPython3Meidum
2064Minimized Maximum of Products Distributed to Any StorePython3Meidum
2070Most Beautiful Item for Each QueryPython3Meidum
2073Time Needed to Buy TicketsPython3Easy
2094Finding 3-Digit Even NumbersPython3Easy
2097Valid Arrangement of PairsPython3Hard
2108Find First Palindromic String in the ArrayPython3Medium
2109Adding Spaces to a StringPython3Medium
2116Check if a Parentheses String Can Be ValidPython3Medium
2125Number of Laser Beams in a BankPython3Medium
2127Maximum Employees to Be Invited to a MeetingPython3Hard
2149Rearrange Array Elements by SignPython3Medium
2161Partition Array According to Given PivotPython3Medium
2168Unique Substrings With Equal Digit FrequencyPython3Medium
2182Construct String With Repeat LimitPython3Medium
2185Counting Words With a Given PrefixPython3Easy
2225Find Players With Zero or One LossesPython3Medium
2257Count Unguarded Cells in the GridPython3Medium
2270Number of Ways to Split ArrayPython3Medium
2275Largest Combination With Bitwise AND Greater Than ZeroPython3Medium
2290Minimum Obstacle Removal to Reach CornerPython3Hard
2294Partition Array Such That Maximum Difference Is KPython3Medium
2330Valid Palindrome IVPython3Hard
2337Move Pieces to Obtain a StringPython3Medium
2342Max Sum of a Pair With Equal Sum of DigitsPython3Medium
2375Construct Smallest Number From DI StringPython3Medium
2381Shifting Letters IIPython3Medium
2385Amount of Time for Binary Tree to Be InfectedPython3Medium
2415Reverse Odd Levels of Binary TreePython3Medium
2418Sort the PeoplePython3Easy
2425Bitwise XOR of All PairingsPython3Medium
2429Minimize XORPython3Medium
2434Using a Robot to Print the Lexicographically Smallest StringPython3Medium
2444Count Subarrays With Fixed BoundsPython3Hard
2460Apply Operations to an ArrayPython3Easy
2461Maximum Sum of Distinct Subarrays With Length KPython3Medium
2466Count Ways To Build Good StringsPython3Medium
2485Find the Pivot IntegerPython3Easy
2490Circular SentencePython3Easy
2493Divide Nodes Into the Maximum Number of GroupsPython3Hard
2516Take K of Each Character From Left and RightPython3Medium
2523Closest Prime Numbers in RangePython3Medium
2529Maximum Count of Positive Integer and Negative IntegerPython3Easy
2530Maximal Score After Applying K OperationsPython3Medium
2540Minimum Common ValuePython3Easy
2554Maximum Number of Integers to Choose From a Range IPython3Medium
2558Take Gifts From the Richest PilePython3Easy
2559Count Vowel Strings in RangesPython3Medium
2563Count the Number of Fair PairsPython3Medium
2566Maximum Difference by Remapping a DigitPython3Easy
2577Minimum Time to Visit a Cell In a GridPython3Hard
2579Count Total Number of Colored CellsPython3Medium
2583Kth Largest Sum in a Binary TreePython3Medium
2593Find Score of an Array After Marking All ElementsPython3Medium
2601Prime Subtraction OperationPython3Medium
2610Convert an Array Into a 2D Array With ConditionsPython3Medium
2616Minimize the Maximum Difference of PairsPython3Medium
2641Cousins in Binary Tree IIPython3Medium
2657Find the Prefix Common Array of Two ArraysPython3Medium
2658Maximum Number of Fish in a GridPython3Medium
2661First Completely Painted Row or ColumnPython3Medium
2683Neighboring Bitwise XORPython3Medium
2696Minimum String Length After Removing SubstringsPython3Easy
2698Find the Punishment Number of an IntegerPython3Medium
2762Continuous SubarraysPython3Medium
2769Find the Maximum Achievable NumberPython3Easy
2779Maximum Beauty of an Array After Applying OperationPython3Medium
2810Faulty KeyboardPython3Easy
2825Make String a Subsequence Using Cyclic IncrementsPython3Easy
2864Maximum Odd Binary NumberPython3Easy
2870Minimum Number of Operations to Make Array EmptyPython3Medium
2914Minimum Number of Changes to Make Binary String BeautifulPython3Medium
2924Find Champion IIPython3Medium
2927Distribute Candies Among Children IIIPython3Hard
2938Separate Black and White BallsPython3Medium
2948Make Lexicographically Smallest Array by Swapping ElementsPython3Medium
2951Find the PeaksPython3Easy
2956Find Common Elements Between Two ArraysPython3Easy
2958Length of Longest Subarray With at Most K FrequencyPython3Medium
2962Count Subarrays Where Max Element Appears at Least K TimesPython3Medium
2965Find Missing and Repeated ValuesPython3Easy
2971Find Polygon With the Largest PerimeterPython3Medium
2981Find Longest Special Substring That Occurs Thrice IPython3Medium
3005Count Elements With Maximum FrequencyPython3Easy
3011Find if Array Can Be SortedPython3Medium
3042Count Prefix and Suffix Pairs IPython3Easy
3062Winner of the Linked List GamePython3Easy
3063Linked List FrequencyPython3Easy
3066Minimum Operations to Exceed Threshold Value IIPython3Medium
3097Shortest Subarray With OR at Least K IIPython3Medium
3105Longest Strictly Increasing or Strictly Decreasing SubarrayPython3Medium
3133Minimum Array EndPython3Medium
3151Special Array IPython3Easy
3152Special Array IIPython3Medium
3163String Compression IIIPython3Medium
3170Lexicographically Minimum String After Removing StarsPython3Medium
3191Minimum Operations to Make Binary Array Elements Equal to One IPython3Medium
3203Find Minimum Diameter After Merging Two TreesPython3Medium
3223Minimum Length of String After OperationsPython3Medium
3243Shortest Distance After Road Addition Queries IPython3Medium
3254Find the Power of K-Size Subarrays IPython3Medium
3264Final Array State After K Multiplication Operations IPython3Medium
3330Find the Original Typed String IPython3Easy
3335Total Characters in String After Transformations IPython3Medium
3356Zero Array Transformation IIPython3Medium
3392Count Subarrays of Length Three With a ConditionPython3Easy
3403Find the Lexicographically Largest String From the Box IPython3Medium
3405Count the Number of Arrays with K Matching Adjacent ElementsPython3Hard
3423Maximum Difference Between Adjacent Elements in a Circular ArrayPython3Easy
3442Maximum Difference Between Even and Odd Frequency IPython3Easy
3445Maximum Difference Between Even and Odd Frequency IIPython3Hard

About

LeetCode Practice

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages