Algorithms-solutions Problem name Difficulty Languages LeetCode Median of Two Sorted Arrays link Merge Two Sorted Lists link Merge k Sorted Lists link Multiply Strings link Maximum Subarray link Merge Intervals link Minimum Path Sum link Minimum Window Substring link Maximal Rectangle link Merge Sorted Array link Maximum Depth of Binary Tree link Minimum Depth of Binary Tree link Max Points on a Line link Maximum Product Subarray link Min Stack link Maximum Gap link Majority Element link Minimum Size Subarray Sum link Maximal Square link Majority Element II link Missing Number link Move Zeroes link Minimum Height Trees link Maximum Product of Word Lengths link Max Sum of Rectangle No Larger Than K link Mini Parser link Maximum XOR of Two Numbers in an Array link Minimum Genetic Mutation link Minimum Number of Arrows to Burst Balloons link Minimum Moves to Equal Array Elements link Minimum Moves to Equal Array Elements II link Matchsticks to Square link Magical String link Max Consecutive Ones link Most Frequent Subtree Sum link Minesweeper link Minimum Absolute Difference in BST link Minimum Time Difference link Maximum Depth of N-ary Tree link Minimum Index Sum of Two Lists link Merge Two Binary Trees link Maximum Product of Three Numbers link Maximum Average Subarray I link Maximum Length of Pair Chain link Maximum Binary Tree link Maximum Width of Binary Tree link Maximum Swap link Map Sum Pairs link Maximum Sum of 3 Non-Overlapping Subarrays link Max Area of Island link Minimum ASCII Delete Sum for Two Strings link Maximum Length of Repeated Subarray link My Calendar I link My Calendar II link My Calendar III link Monotone Increasing Digits link Min Cost Climbing Stairs link Max Chunks To Make Sorted II link Max Chunks To Make Sorted link Minimum Distance Between BST Nodes link Minimum Swaps To Make Sequences Increasing link Max Increase to Keep City Skyline link Most Common Word link Most Profit Assigning Work link Making A Large Island link Masking Personal Information link Magic Squares In Grid link Maximize Distance to Closest Person link Minimum Cost to Hire K Workers link Mirror Reflection link Minimum Number of Refueling Stops link Middle of the Linked List link Maximum Frequency Stack link Monotonic Array link Maximum Sum Circular Subarray link Minimum Add to Make Parentheses Valid link Minimize Malware Spread link Minimize Malware Spread II link Minimum Falling Path Sum link Minimum Area Rectangle link Minimum Increment to Make Array Unique link Most Stones Removed with Same Row or Column link Maximum Width Ramp link Minimum Area Rectangle II link Minimum Cost For Tickets link Minimum Number of K Consecutive Bit Flips link Maximum Binary Tree II link Minimum Cost to Merge Stones link Max Consecutive Ones III link Maximize Sum Of Array After K Negations link Minimum Domino Rotations For Equal Row link Maximum Difference Between Node and Ancestor link Matrix Cells in Distance Order link Maximum Sum of Two Non-Overlapping Subarrays link Moving Stones Until Consecutive link Minimum Score Triangulation of Polygon link Moving Stones Until Consecutive II link Maximum Nesting Depth of Two Valid Parentheses Strings link Minimum Cost Tree From Leaf Values link Maximum of Absolute Value Expression link Maximum Level Sum of a Binary Tree link Maximum Subarray Sum with One Deletion link Make Array Strictly Increasing link Maximum Number of Balloons link Minimum Absolute Difference link Minimum Moves to Reach Target with Rotations link Minimum Cost to Move Chips to The Same Position link Maximum Equal Frequency link Maximum Profit in Job Scheduling link Maximum Length of a Concatenated String with Unique Characters link Minimum Swaps to Make Strings Equal link Minimum Remove to Make Valid Parentheses link Maximum Score Words Formed by Letters link Minimum Moves to Move a Box to Their Target Location link Minimum Time Visiting All Points link Minimum Number of Flips to Convert Binary Matrix to Zero Matrix link Minimum Falling Path Sum II link Maximum Side Length of a Square with Sum Less than or Equal to Threshold link Maximum Number of Occurrences of a Substring link Maximum Candies You Can Get from Boxes link Minimum Insertion Steps to Make a String Palindrome link Matrix Block Sum link Minimum Flips to Make a OR b Equal to c link Minimum Distance to Type a Word Using Two Fingers link Maximum 69 Number link Minimum Number of Taps to Open to Water a Garden link Minimum Difficulty of a Job Schedule link Maximum Product of Splitted Binary Tree link Minimum Number of Steps to Make Two Strings Anagram link Maximum Students Taking Exam link Maximum Number of Events That Can Be Attended link Minimum Cost to Make at Least One Valid Path in a Grid link Maximum Sum BST in Binary Tree link Maximum Performance of a Team link Minimum Subsequence in Non-Increasing Order link Minimum Value to Get Positive Step by Step Sum link Minimum Number of Frogs Croaking link Maximum Score After Splitting a String link Maximum Points You Can Obtain from Cards link Max Difference You Can Get From Changing an Integer link Minimum Time to Collect All Apples in a Tree link Maximum Number of Darts Inside of a Circular Dartboard link Maximum Number of Vowels in a Substring of Given Length link Max Dot Product of Two Subsequences link Make Two Arrays Equal by Reversing Sub-arrays link Maximum Product of Two Elements in an Array link Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts link Minimum Number of Days to Make m Bouquets link Making File Names Unique link Max Value of Equation link Minimum Possible Integer After at Most K Adjacent Swaps On Digits link Minimum Difference Between Largest and Smallest Value in Three Moves link Maximum Number of Non-Overlapping Substrings link Minimum Number of Increments on Subarrays to Form a Target Array link Minimum Suffix Flips link Minimum Swaps to Arrange a Binary Grid link Minimum Insertions to Balance a Parentheses String link Make The String Great link Maximum Number of Non-Overlapping Subarrays With Sum Equals Target link Minimum Cost to Cut a Stick link Minimum Operations to Make Array Equal link Magnetic Force Between Two Balls link Minimum Number of Days to Eat N Oranges link Minimum Number of Vertices to Reach All Nodes link Minimum Numbers of Function Calls to Make Target Array link Most Visited Sector in a Circular Track link Maximum Number of Coins You Can Get link Maximum Length of Subarray With Positive Product link Minimum Number of Days to Disconnect Island link Matrix Diagonal Sum link Minimum Time to Make Rope Colorful link Min Cost to Connect All Points link Maximum Sum Obtained of Any Permutation link Make Sum Divisible by P link Maximum Non Negative Product in a Matrix link Minimum Cost to Connect Two Groups of Points link Maximum Profit of Operating a Centennial Wheel link Maximum Number of Achievable Transfer Requests link Maximum Number of Visible Points link Minimum One Bit Operations to Make Integers Zero link Maximum Nesting Depth of the Parentheses link Maximal Network Rank link Mean of Array After Removing Some Elements link Minimum Deletions to Make Character Frequencies Unique link Minimum Deletions to Make String Balanced link Minimum Jumps to Reach Home link Minimum Operations to Reduce X to Zero link Maximize Grid Happiness link Minimum Initial Energy to Finish Tasks link Maximum Repeating Substring link Merge In Between Linked Lists link Minimum Number of Removals to Make Mountain Array link Minimum Moves to Make Array Complementary link Minimize Deviation in Array link Max Number of K-Sum Pairs link Minimum Incompatibility link Maximum Erasure Value link Maximum Binary String After Change link Minimum Adjacent Swaps for K Consecutive Ones link Maximum Number of Eaten Apples link Maximum XOR With an Element From Array link Maximum Units on a Truck link Minimum Operations to Make a Subsequence link Maximum Score From Removing Substrings link Minimize Hamming Distance After Swap Operations link Minimum Number of People to Teach link Maximum Number of Balls in a Box link Maximum Absolute Sum of Any Subarray link Minimum Length of String After Deleting Similar Ends link Maximum Number of Events That Can Be Attended II link Maximum Score From Removing Stones link Minimum Changes To Make Alternating Binary String link Minimum Limit of Balls in a Bag link Minimum Degree of a Connected Trio in a Graph link Map of Highest Peak link Merge Strings Alternately link Minimum Number of Operations to Move All Balls to Each Box link Maximum Score from Performing Multiplication Operations link Maximize Palindrome Length From Subsequences link Minimum Elements to Add to Form a Given Sum link Make the XOR of All Segments Equal to Zero link Maximum Average Pass Ratio link Maximum Score of a Good Subarray link Maximum Number of Consecutive Values You Can Make link Maximize Score After N Operations link Maximum Ascending Subarray Sum link Maximum Value at a Given Index in a Bounded Array link Minimum Number of Operations to Reinitialize a Permutation link Maximize Number of Nice Divisors link Maximum Number of Groups Getting Fresh Donuts link Minimum Absolute Sum Difference link Minimum Sideway Jumps link Minimum Operations to Make the Array Increasing link Maximum XOR for Each Query link Minimum Number of Operations to Make String Sorted link Maximum Ice Cream Bars link Maximum Building Height link Maximum Element After Decreasing and Rearranging link Minimum Distance to the Target Element link Minimum Adjacent Swaps to Reach the Kth Smallest Number link Minimum Interval to Include Each Query link Maximum Population Year link Maximum Distance Between a Pair of Values link Maximum Subarray Min-Product link Minimum Number of Swaps to Make the Binary String Alternating link Minimum Speed to Arrive on Time link Minimize Maximum Pair Sum in Array link Minimum XOR Sum of Two Arrays link Maximum Value after Insertion link Minimum Skips to Arrive at Meeting On Time link Minimum Number of Flips to Make the Binary String Alternating link Minimum Space Wasted From Packaging link Minimum Cost to Change the Final Value of Expression link Maximum Number of Removable Characters link Merge Triplets to Form Target Triplet link Minimum Absolute Difference Queries link Maximum Alternating Subsequence Sum link Maximum Product Difference Between Two Pairs link Minimum Cost to Reach Destination in Time link Merge BSTs to Create Single BST link Maximum Number of Words You Can Type link Maximum Number of Points with Cost link Maximum Genetic Difference Query link Maximum Compatibility Score Sum link Maximum Number of Weeks for Which You Can Work link Minimum Garden Perimeter to Collect Enough Apples link Minimum Total Space Wasted With K Resizing Operations link Maximum Product of the Length of Two Palindromic Substrings link Minimum Number of Swaps to Make the String Balanced link Minimum Non-Zero Product of the Array Elements link Minimum Time to Type Word Using Special Typewriter link Maximum Matrix Sum link Minimize the Difference Between Target and Chosen Elements link Minimum Difference Between Highest and Lowest of K Scores link Minimum Number of Work Sessions to Finish the Tasks link Maximum Product of the Length of Two Palindromic Subsequences link Maximum Earnings From Taxi link Minimum Number of Operations to Make Array Continuous link Maximum Difference Between Increasing Elements link Maximize the Confusion of an Exam link Maximum Number of Ways to Partition an Array link Minimum Moves to Convert String link Minimum Operations to Make a Uni-Value Grid link Minimum Number of Moves to Seat Everyone link Minimum Operations to Convert Number link Minimized Maximum of Products Distributed to Any Store link Maximum Path Quality of a Graph link Most Beautiful Item for Each Query link Maximum Number of Tasks You Can Assign link Minimum Number of Buckets Required to Collect Rainwater from Houses link Minimum Cost Homecoming of a Robot in a Grid link Maximum Fruits Harvested After at Most K Steps link Minimum Operations to Make the Array K-Increasing link Maximum Number of Words Found in Sentences link Maximum Employees to Be Invited to a Meeting link Maximum Twin Sum of a Linked List link Minimum Swaps to Group All 1's Together II link Minimum Moves to Reach Target Score link Maximum Running Time of N Computers link Minimum Cost of Buying Candies With Discount link Maximum Good People Based on Statements link Minimum Sum of Four Digit Number After Splitting Digits link Minimum Cost to Set Cooking Time link Minimum Difference in Sums After Removal of Elements link Minimum Time to Remove All Cars Containing Illegal Goods link Minimum Operations to Make the Array Alternating link Maximum AND Sum of Array link Maximum Split of Positive Even Integers link Merge Nodes in Between Zeros link Minimum Number of Steps to Make Two Strings Anagram II link Minimum Time to Complete Trips link Minimum Time to Finish the Race link Most Frequent Number Following Key In an Array link Minimum Number of Moves to Make Palindrome link Maximize the Topmost Element After K Moves link Minimum Weighted Subgraph With the Required Paths link Maximize Number of Subsequences in a String link Minimum Operations to Halve Array Sum link Minimum White Tiles After Covering With Carpets link Maximum Points in an Archery Competition link Minimum Deletions to Make Array Beautiful link Maximum Value of K Coins From Piles link Minimum Bit Flips to Convert Number link Minimum Number of Operations to Convert Time link Maximum Candies Allocated to K Children link Minimize Result by Adding Parentheses to Expression link Maximum Product After K Increments link Maximum Total Beauty of the Gardens link Maximum Score of a Node Sequence link Minimum Rounds to Complete All Tasks link Maximum Trailing Zeros in a Cornered Path link Minimum Average Difference link Minimum Consecutive Cards to Pick Up link Maximum White Tiles Covered by a Carpet link Maximum Consecutive Floors Without Special Floors link Maximum Bags With Full Capacity of Rocks link Minimum Lines to Represent a Line Chart link Maximum Total Importance of Roads link Minimum Obstacle Removal to Reach Corner link Min Max Game link Match Substring After Replacement link Minimum Path Cost in a Grid link Maximum Score Of Spliced Array link Minimum Score After Removals on a Tree link Minimum Sum of Squared Difference link Minimum Amount of Time to Fill Cups link Move Pieces to Obtain a String link Maximum Number of Pairs in Array link Max Sum of a Pair With Equal Sum of Digits link Minimum Deletions to Make Array Divisible link Make Array Zero by Subtracting Equal Amounts link Maximum Number of Groups Entering a Competition link Merge Similar Items link Minimum Replacements to Sort the Array link