Medium LeetCode Problems: Page 6 of 8

Problems 1,001 to 1,200 of the 1,579 Medium-rated problems in this library, continuing the list on the Medium hub.

ProblemsPage 6 of 8
Medium problems, page 6
No.Problem
2443Sum of Number and Its Reverse
2447Number of Subarrays With GCD Equal to K
2452Words Within Two Edits of Dictionary
2453Destroy Sequential Targets
2456Most Popular Video Creator
2457Minimum Addition to Make Integer Beautiful
2461Maximum Sum of Distinct Subarrays With Length K
2462Total Cost to Hire K Workers
2466Count Ways To Build Good Strings
2467Most Profitable Path in a Tree
2470Number of Subarrays With LCM Equal to K
2471Minimum Number of Operations to Sort a Binary Tree by Level
2476Closest Nodes Queries in a Binary Search Tree
2477Minimum Fuel Cost to Report to the Capital
2482Difference Between Ones and Zeros in Row and Column
2483Minimum Penalty for a Shop
2486Append Characters to String to Make Subsequence
2487Remove Nodes From Linked List
2491Divide Players Into Teams of Equal Skill
2492Minimum Score of a Path Between Two Cities
2497Maximum Star Sum of a Graph
2498Frog Jump II
2501Longest Square Streak in an Array
2502Design Memory Allocator
2507Smallest Value After Replacing With Sum of Prime Factors
2512Reward Top K Students
2513Minimize the Maximum of Two Arrays
2516Take K of Each Character From Left and Right
2517Maximum Tastiness of Candy Basket
2521Distinct Prime Factors of Product of Array
2522Partition String Into Substrings With Values at Most K
2523Closest Prime Numbers in Range
2526Find Consecutive Integers from a Data Stream
2527Find Xor-Beauty of Array
2530Maximal Score After Applying K Operations
2531Make Number of Distinct Characters Equal
2536Increment Submatrices by One
2537Count the Number of Good Subarrays
2541Minimum Operations to Make Array Equal II
2542Maximum Subsequence Score
2545Sort the Students by Their Kth Score
2546Apply Bitwise Operations to Make Strings Equal
2550Count Collisions of Monkeys on a Polygon
2554Maximum Number of Integers to Choose From a Range I
2555Maximize Win From Two Segments
2556Disconnect Path in a Binary Matrix by at Most One Flip
2559Count Vowel Strings in Ranges
2560House Robber IV
2563Count the Number of Fair Pairs
2564Substring XOR Queries
2567Minimum Score by Changing Two Elements
2568Minimum Impossible OR
2571Minimum Operations to Reduce an Integer to 0
2572Count the Number of Square-Free Subsets
2575Find the Divisibility Array of a String
2576Find the Maximum Number of Marked Indices
2579Count Total Number of Colored Cells
2580Count Ways to Group Overlapping Ranges
2583Kth Largest Sum in a Binary Tree
2587Rearrange Array to Maximize Prefix Score
2588Count the Number of Beautiful Subarrays
2592Maximize Greatness of an Array
2593Find Score of an Array After Marking All Elements
2594Minimum Time to Repair Cars
2596Check Knight Tour Configuration
2597The Number of Beautiful Subsets
2598Smallest Missing Non-negative Integer After Operations
2601Prime Subtraction Operation
2602Minimum Operations to Make All Array Elements Equal
2606Find the Substring With Maximum Cost
2607Make K-Subarray Sums Equal
2610Convert an Array Into a 2D Array With Conditions
2611Mice and Cheese
2615Sum of Distances
2616Minimize the Maximum Difference of Pairs
2640Find the Score of All Prefixes of an Array
2641Cousins in Binary Tree II
2645Minimum Additions to Make Valid String
2653Sliding Subarray Beauty
2654Minimum Number of Operations to Make All Array Elements Equal to 1
2657Find the Prefix Common Array of Two Arrays
2658Maximum Number of Fish in a Grid
2661First Completely Painted Row or Column
2662Minimum Cost of a Path With Special Roads
2671Frequency Tracker
2672Number of Adjacent Elements With the Same Color
2673Make Costs of Paths Equal in a Binary Tree
2679Sum in a Matrix
2680Maximum OR
2683Neighboring Bitwise XOR
2684Maximum Number of Moves in a Grid
2685Count the Number of Complete Components
2698Find the Punishment Number of an Integer
2707Extra Characters in a String
2708Maximum Strength of a Group
2711Difference of Number of Distinct Values on Diagonals
2712Minimum Cost to Make All Characters Equal
2718Sum of Matrix After Queries
2730Find the Longest Semi-Repetitive Substring
2731Movement of Robots
2734Lexicographically Smallest String After Substring Operation
2735Collecting Chocolates
2740Find the Value of the Partition
2741Special Permutations
2745Construct the Longest New String
2746Decremental String Concatenation
2747Count Zero Request Servers
2749Minimum Operations to Make the Integer Zero
2750Ways to Split Array Into Good Subarrays
2761Prime Pairs With Target Sum
2762Continuous Subarrays
2766Relocate Marbles
2767Partition String Into Minimum Beautiful Substrings
2768Number of Black Blocks
2770Maximum Number of Jumps to Reach the Last Index
2771Longest Non-decreasing Subarray From Two Arrays
2772Apply Operations to Make All Array Elements Equal to Zero
2779Maximum Beauty of an Array After Applying Operation
2780Minimum Index of a Valid Split
2785Sort Vowels in a String
2786Visit Array Positions to Maximize Score
2787Ways to Express an Integer as Sum of Powers
2789Largest Element in an Array after Merge Operations
2799Count Complete Subarrays in an Array
2800Shortest String That Contains Three Strings
2807Insert Greatest Common Divisors in Linked List
2808Minimum Seconds to Equalize a Circular Array
2811Check if it is Possible to Split Array
2812Find the Safest Path in a Grid
2816Double a Number Represented as a Linked List
2817Minimum Absolute Difference Between Elements With Constraint
2825Make String a Subsequence Using Cyclic Increments
2826Sorting Three Groups
2829Determine the Minimum Sum of a k-avoiding Array
2830Maximize the Profit as the Salesman
2831Find the Longest Equal Subarray
2834Find the Minimum Possible Sum of a Beautiful Array
2840Check if Strings Can be Made Equal With Operations II
2841Maximum Sum of Almost Unique Subarray
2844Minimum Operations to Make a Special Number
2845Count of Interesting Subarrays
2849Determine if a Cell Is Reachable at a Given Time
2850Minimum Moves to Spread Stones Over Grid
2856Minimum Array Length After Pair Removals
2857Count Pairs of Points With Distance k
2860Happy Students
2861Maximum Number of Alloys
2865Beautiful Towers I
2866Beautiful Towers II
2870Minimum Number of Operations to Make Array Empty
2871Split Array Into Maximum Number of Subarrays
2874Maximum Value of an Ordered Triplet II
2875Minimum Size Subarray in Infinite Array
2895Minimum Processing Time
2896Apply Operations to Make Two Strings Equal
2901Longest Unequal Adjacent Groups Subsequence II
2904Shortest and Lexicographically Smallest Beautiful String
2905Find Indices With Index and Value Difference II
2906Construct Product Matrix
2909Minimum Sum of Mountain Triplets II
2910Minimum Number of Groups to Create a Valid Assignment
2914Minimum Number of Changes to Make Binary String Beautiful
2915Length of the Longest Subsequence That Sums to Target
2918Minimum Equal Sum of Two Arrays After Replacing Zeros
2919Minimum Increment Operations to Make Array Beautiful
2924Find Champion II
2925Maximum Score After Applying Operations on a Tree
2929Distribute Candies Among Children II
2930Number of Strings Which Can Be Rearranged to Contain Substring
2933High-Access Employees
2934Minimum Operations to Maximize Last Elements in Arrays
2938Separate Black and White Balls
2939Maximum Xor Product
2943Maximize Area of Square Hole in Grid
2944Minimum Number of Coins for Fruits
2947Count Beautiful Substrings I
2948Make Lexicographically Smallest Array by Swapping Elements
2952Minimum Number of Coins to be Added
2957Remove Adjacent Almost-Equal Characters
2958Length of Longest Subarray With at Most K Frequency
2961Double Modular Exponentiation
2962Count Subarrays Where Max Element Appears at Least K Times
2966Divide Array Into Arrays With Max Difference
2967Minimum Cost to Make Array Equalindromic
2971Find Polygon With the Largest Perimeter
2975Maximum Square Area by Removing Fences From a Field
2976Minimum Cost to Convert String I
2981Find Longest Special Substring That Occurs Thrice I
2982Find Longest Special Substring That Occurs Thrice II
2997Minimum Number of Operations to Make Array XOR Equal to K
2998Minimum Number of Operations to Make X and Y Equal
0156Binary Tree Upside DownPremium
0159Longest Substring with At Most Two Distinct CharactersPremium
0161One Edit DistancePremium
0186Reverse Words in a String IIPremium
0244Shortest Word Distance IIPremium
0245Shortest Word Distance IIIPremium
0247Strobogrammatic Number IIPremium
0249Group Shifted StringsPremium
0250Count Univalue SubtreesPremium

Problems with a complete Python solution are listed first, then by ascending problem number. Or go by technique instead: all LeetCode patterns.