Medium LeetCode Problems: Page 3 of 8

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

ProblemsPage 3 of 8
Medium problems, page 3
No.Problem
0889Construct Binary Tree from Preorder and Postorder Traversal
0890Find and Replace Pattern
0893Groups of Special-Equivalent Strings
0894All Possible Full Binary Trees
0898Bitwise ORs of Subarrays
0900RLE Iterator
0901Online Stock Span
0904Fruit Into Baskets
0907Sum of Subarray Minimums
0909Snakes and Ladders
0910Smallest Range II
0911Online Election
0912Sort an Array
0915Partition Array into Disjoint Intervals
0916Word Subsets
0918Maximum Sum Circular Subarray
0919Complete Binary Tree Inserter
0921Minimum Add to Make Parentheses Valid
09233Sum With Multiplicity
0926Flip String to Monotone Increasing
0930Binary Subarrays With Sum
0931Minimum Falling Path Sum
0932Beautiful Array
0934Shortest Bridge
0935Knight Dialer
0937Reorder Data in Log Files
0939Minimum Area Rectangle
0945Minimum Increment to Make Array Unique
0946Validate Stack Sequences
0947Most Stones Removed with Same Row or Column
0948Bag of Tokens
0949Largest Time for Given Digits
0950Reveal Cards In Increasing Order
0951Flip Equivalent Binary Trees
0954Array of Doubled Pairs
0955Delete Columns to Make Sorted II
0958Check Completeness of a Binary Tree
0959Regions Cut By Slashes
0962Maximum Width Ramp
0963Minimum Area Rectangle II
0966Vowel Spellchecker
0967Numbers With Same Consecutive Differences
0969Pancake Sorting
0970Powerful Integers
0971Flip Binary Tree To Match Preorder Traversal
0973K Closest Points to Origin
0974Subarray Sums Divisible by K
0978Longest Turbulent Subarray
0979Distribute Coins in Binary Tree
0981Time Based Key-Value Store
0983Minimum Cost For Tickets
0984String Without AAA or BBB
0985Sum of Even Numbers After Queries
0986Interval List Intersections
0988Smallest String Starting From Leaf
0990Satisfiability of Equality Equations
0991Broken Calculator
0994Rotting Oranges
0998Maximum Binary Tree II
1003Check If Word Is Valid After Substitutions
1004Max Consecutive Ones III
1006Clumsy Factorial
1007Minimum Domino Rotations For Equal Row
1008Construct Binary Search Tree from Preorder Traversal
1010Pairs of Songs With Total Durations Divisible by 60
1011Capacity To Ship Packages Within D Days
1014Best Sightseeing Pair
1015Smallest Integer Divisible by K
1016Binary String With Substrings Representing 1 To N
1017Convert to Base -2
1019Next Greater Node In Linked List
1020Number of Enclaves
1023Camelcase Matching
1024Video Stitching
1026Maximum Difference Between Node and Ancestor
1027Longest Arithmetic Subsequence
1029Two City Scheduling
1031Maximum Sum of Two Non-Overlapping Subarrays
1033Moving Stones Until Consecutive
1034Coloring A Border
1035Uncrossed Lines
1038Binary Search Tree to Greater Sum Tree
1039Minimum Score Triangulation of Polygon
1040Moving Stones Until Consecutive II
1041Robot Bounded In Circle
1042Flower Planting With No Adjacent
1043Partition Array for Maximum Sum
1048Longest String Chain
1049Last Stone Weight II
1052Grumpy Bookstore Owner
1053Previous Permutation With One Swap
1054Distant Barcodes
1061Lexicographically Smallest Equivalent String
1072Flip Columns For Maximum Number of Equal Rows
1073Adding Two Negabinary Numbers
1079Letter Tile Possibilities
1080Insufficient Nodes in Root to Leaf Paths
1081Smallest Subsequence of Distinct Characters
1090Largest Values From Labels
1091Shortest Path in Binary Matrix
1093Statistics from a Large Sample
1094Car Pooling
1104Path In Zigzag Labelled Binary Tree
1105Filling Bookcase Shelves
1109Corporate Flight Bookings
1110Delete Nodes And Return Forest
1111Maximum Nesting Depth of Two Valid Parentheses Strings
1115Print FooBar Alternately
1116Print Zero Even Odd
1117Building H2O
1123Lowest Common Ancestor of Deepest Leaves
1124Longest Well-Performing Interval
1129Shortest Path with Alternating Colors
1130Minimum Cost Tree From Leaf Values
1131Maximum of Absolute Value Expression
1138Alphabet Board Path
1139Largest 1-Bordered Square
1140Stone Game II
1143Longest Common Subsequence
1144Decrease Elements To Make Array Zigzag
1145Binary Tree Coloring Game
1146Snapshot Array
1155Number of Dice Rolls With Target Sum
1156Swap For Longest Repeated Character Substring
1161Maximum Level Sum of a Binary Tree
1162As Far from Land as Possible
1169Invalid Transactions
1170Compare Strings by Frequency of the Smallest Character
1171Remove Zero Sum Consecutive Nodes from Linked List
1177Can Make Palindrome from Substring
1186Maximum Subarray Sum with One Deletion
1190Reverse Substrings Between Each Pair of Parentheses
1191K-Concatenation Maximum Sum
1201Ugly Number III
1202Smallest String With Swaps
1208Get Equal Substrings Within Budget
1209Remove All Adjacent Duplicates in String II
1218Longest Arithmetic Subsequence of Given Difference
1219Path with Maximum Gold
1222Queens That Can Attack the King
1227Airplane Seat Assignment Probability
1233Remove Sub-Folders from the Filesystem
1234Replace the Substring for Balanced String
1237Find Positive Integer Solution for a Given Equation
1238Circular Permutation in Binary Representation
1239Maximum Length of a Concatenated String with Unique Characters
1247Minimum Swaps to Make Strings Equal
1248Count Number of Nice Subarrays
1249Minimum Remove to Make Valid Parentheses
1253Reconstruct a 2-Row Binary Matrix
1254Number of Closed Islands
1261Find Elements in a Contaminated Binary Tree
1262Greatest Sum Divisible by Three
1267Count Servers that Communicate
1268Search Suggestions System
1276Number of Burgers with No Waste of Ingredients
1277Count Square Submatrices with All Ones
1282Group the People Given the Group Size They Belong To
1283Find the Smallest Divisor Given a Threshold
1286Iterator for Combination
1288Remove Covered Intervals
1291Sequential Digits
1292Maximum Side Length of a Square with Sum Less than or Equal to Threshold
1296Divide Array in Sets of K Consecutive Numbers
1297Maximum Number of Occurrences of a Substring
1300Sum of Mutated Array Closest to Target
1302Deepest Leaves Sum
1305All Elements in Two Binary Search Trees
1306Jump Game III
1310XOR Queries of a Subarray
1311Get Watched Videos by Your Friends
1314Matrix Block Sum
1315Sum of Nodes with Even-Valued Grandparent
1318Minimum Flips to Make a OR b Equal to c
1319Number of Operations to Make Network Connected
1324Print Words Vertically
1325Delete Leaves With a Given Value
1328Break a Palindrome
1329Sort the Matrix Diagonally
1333Filter Restaurants by Vegan-Friendly, Price and Distance
1334Find the City With the Smallest Number of Neighbors at a Threshold Distance
1338Reduce Array Size to The Half
1339Maximum Product of Splitted Binary Tree
1343Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold
1344Angle Between Hands of a Clock
1347Minimum Number of Steps to Make Two Strings Anagram
1348Tweet Counts Per Frequency
1352Product of the Last K Numbers
1353Maximum Number of Events That Can Be Attended
1357Apply Discount Every n Orders
1358Number of Substrings Containing All Three Characters
1361Validate Binary Tree Nodes
1362Closest Divisors
1366Rank Teams by Votes
1367Linked List in Binary Tree
1371Find the Longest Substring Containing Vowels in Even Counts
1372Longest ZigZag Path in a Binary Tree
1375Number of Times Binary String Is Prefix-Aligned
1376Time Needed to Inform All Employees
1381Design a Stack With Increment Operation

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