← back
Heap (Priority Queue)
178 questions · 0 seen
All Heap (Priority Queue) problems
Heap (Priority Queue)
1
Actions
⊣ Practice
Heap (Priority Queue)
⊣ Quiz
Heap (Priority Queue)
Problems
⊣ 23 Merge k Sorted Lists
Hard
⊣ 215 Kth Largest Element in an Array
Medium
⊣ 218 The Skyline Problem
Hard
⊣ 239 Sliding Window Maximum
Hard
⊣ 264 Ugly Number II
Medium
⊣ 295 Find Median from Data Stream
Hard
⊣ 332 Reconstruct Itinerary
Hard
⊣ 347 Top K Frequent Elements
Medium
⊣ 355 Design Twitter
Medium
⊣ 373 Find K Pairs with Smallest Sums
Medium
⊣ 378 Kth Smallest Element in a Sorted Matrix
Medium
⊣ 407 Trapping Rain Water II
Hard
⊣ 420 Strong Password Checker
Hard
⊣ 451 Sort Characters By Frequency
Medium
⊣ 480 Sliding Window Median
Hard
⊣ 502 IPO
Hard
⊣ 506 Relative Ranks
Easy
⊣ 621 Task Scheduler
Medium
⊣ 630 Course Schedule III
Hard
⊣ 632 Smallest Range Covering Elements from K Lists
Hard
⊣ 658 Find K Closest Elements
Medium
⊣ 659 Split Array into Consecutive Subsequences
Medium
⊣ 675 Cut Off Trees for Golf Event
Hard
⊣ 692 Top K Frequent Words
Medium
⊣ 703 Kth Largest Element in a Stream
Easy
⊣ 743 Network Delay Time
Medium
⊣ 767 Reorganize String
Medium
⊣ 778 Swim in Rising Water
Hard
⊣ 786 K-th Smallest Prime Fraction
Medium
⊣ 787 Cheapest Flights Within K Stops
Medium
⊣ 855 Exam Room
Medium
⊣ 857 Minimum Cost to Hire K Workers
Hard
⊣ 862 Shortest Subarray with Sum at Least K
Hard
⊣ 871 Minimum Number of Refueling Stops
Hard
⊣ 882 Reachable Nodes In Subdivided Graph
Hard
⊣ 912 Sort an Array
Medium
⊣ 973 K Closest Points to Origin
Medium
⊣ 1046 Last Stone Weight
Easy
⊣ 1054 Distant Barcodes
Medium
⊣ 1094 Car Pooling
Medium
⊣ 1172 Dinner Plate Stacks
Hard
⊣ 1263 Minimum Moves to Move a Box to Their Target Location
Hard
⊣ 1268 Search Suggestions System
Medium
⊣ 1337 The K Weakest Rows in a Matrix
Easy
⊣ 1338 Reduce Array Size to The Half
Medium
⊣ 1353 Maximum Number of Events That Can Be Attended
Medium
⊣ 1354 Construct Target Array With Multiple Sums
Hard
⊣ 1368 Minimum Cost to Make at Least One Valid Path in a Grid
Hard
⊣ 1383 Maximum Performance of a Team
Hard
⊣ 1388 Pizza With 3n Slices
Hard
⊣ 1405 Longest Happy String
Medium
⊣ 1424 Diagonal Traverse II
Medium
⊣ 1425 Constrained Subsequence Sum
Hard
⊣ 1438 Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit
Medium
⊣ 1439 Find the Kth Smallest Sum of a Matrix With Sorted Rows
Hard
⊣ 1464 Maximum Product of Two Elements in an Array
Easy
⊣ 1488 Avoid Flood in The City
Medium
⊣ 1499 Max Value of Equation
Hard
⊣ 1514 Path with Maximum Probability
Medium
⊣ 1606 Find Servers That Handled Most Number of Requests (PRO)
Hard
⊣ 1631 Path With Minimum Effort
Medium
⊣ 1642 Furthest Building You Can Reach
Medium
⊣ 1648 Sell Diminishing-Valued Colored Balls
Medium
⊣ 1675 Minimize Deviation in Array (PRO)
Hard
⊣ 1686 Stone Game VI
Medium
⊣ 1687 Delivering Boxes from Storage to Ports
Hard
⊣ 1696 Jump Game VI
Medium
⊣ 1705 Maximum Number of Eaten Apples
Medium
⊣ 1738 Find Kth Largest XOR Coordinate Value (PRO)
Medium
⊣ 1753 Maximum Score From Removing Stones
Medium
⊣ 1776 Car Fleet II
Hard
⊣ 1786 Number of Restricted Paths From First to Last Node
Medium
⊣ 1792 Maximum Average Pass Ratio (PRO)
Medium
⊣ 1801 Number of Orders in the Backlog
Medium
⊣ 1825 Finding MK Average
Hard
⊣ 1834 Single-Threaded CPU (PRO)
Medium
⊣ 1845 Seat Reservation Manager
Medium
⊣ 1851 Minimum Interval to Include Each Query (PRO)
Hard
⊣ 1878 Get Biggest Three Rhombus Sums in a Grid
Medium
⊣ 1882 Process Tasks Using Servers (PRO)
Medium
⊣ 1912 Design Movie Rental System
Hard
⊣ 1942 The Number of the Smallest Unoccupied Chair
Medium
⊣ 1962 Remove Stones to Minimize the Total (PRO)
Medium
⊣ 1985 Find the Kth Largest Integer in the Array
Medium
⊣ 2034 Stock Price Fluctuation
Medium
⊣ 2054 Two Best Non-Overlapping Events
Medium
⊣ 2099 Find Subsequence of Length K With the Largest Sum
Easy
⊣ 2102 Sequentially Ordinal Rank Tracker
Hard
⊣ 2146 K Highest Ranked Items Within a Price Range
Medium
⊣ 2163 Minimum Difference in Sums After Removal of Elements
Hard
⊣ 2182 Construct String With Repeat Limit
Medium
⊣ 2203 Minimum Weighted Subgraph With the Required Paths
Hard
⊣ 2208 Minimum Operations to Halve Array Sum
Medium
⊣ 2231 Largest Number After Digit Swaps by Parity
Easy
⊣ 2233 Maximum Product After K Increments
Medium
⊣ 2285 Maximum Total Importance of Roads
Medium
⊣ 2290 Minimum Obstacle Removal to Reach Corner
Hard
⊣ 2333 Minimum Sum of Squared Difference
Medium
⊣ 2335 Minimum Amount of Time to Fill Cups
Easy
⊣ 2336 Smallest Number in Infinite Set
Medium
⊣ 2342 Max Sum of a Pair With Equal Sum of Digits
Medium
⊣ 2343 Query Kth Smallest Trimmed Number
Medium
⊣ 2344 Minimum Deletions to Make Array Divisible
Hard
⊣ 2349 Design a Number Container System
Medium
⊣ 2353 Design a Food Rating System
Medium
⊣ 2357 Make Array Zero by Subtracting Equal Amounts
Easy
⊣ 2386 Find the K-Sum of an Array
Hard
⊣ 2398 Maximum Number of Robots Within Budget
Hard
⊣ 2402 Meeting Rooms III
Hard
⊣ 2406 Divide Intervals Into Minimum Number of Groups
Medium
⊣ 2424 Longest Uploaded Prefix
Medium
⊣ 2454 Next Greater Element IV
Hard
⊣ 2456 Most Popular Video Creator
Medium
⊣ 2462 Total Cost to Hire K Workers
Medium
⊣ 2497 Maximum Star Sum of a Graph
Medium
⊣ 2500 Delete Greatest Value in Each Row
Easy
⊣ 2503 Maximum Number of Points From Grid Queries
Hard
⊣ 2512 Reward Top K Students
Medium
⊣ 2530 Maximal Score After Applying K Operations
Medium
⊣ 2532 Time to Cross a Bridge
Hard
⊣ 2542 Maximum Subsequence Score
Medium
⊣ 2551 Put Marbles in Bags
Hard
⊣ 2558 Take Gifts From the Richest Pile
Easy
⊣ 2577 Minimum Time to Visit a Cell In a Grid
Hard
⊣ 2593 Find Score of an Array After Marking All Elements
Medium
⊣ 2611 Mice and Cheese
Medium
⊣ 2617 Minimum Number of Visited Cells in a Grid
Hard
⊣ 2642 Design Graph With Shortest Path Calculator
Hard
⊣ 2662 Minimum Cost of a Path With Special Roads
Medium
⊣ 2679 Sum in a Matrix
Medium
⊣ 2699 Modify Graph Edge Weights
Hard
⊣ 2762 Continuous Subarrays
Medium
⊣ 2812 Find the Safest Path in a Grid
Medium
⊣ 2813 Maximum Elegance of a K-Length Subsequence
Hard
⊣ 2931 Maximum Spending After Buying Items
Hard
⊣ 2940 Find Building Where Alice and Bob Can Meet
Hard
⊣ 2944 Minimum Number of Coins for Fruits
Medium
⊣ 2959 Number of Possible Sets of Closing Branches
Hard
⊣ 2973 Find Number of Coins to Place in Tree Nodes
Hard
⊣ 2974 Minimum Number Game
Easy
⊣ 3013 Divide an Array Into Subarrays With Minimum Cost II
Hard
⊣ 3049 Earliest Second to Mark Indices II
Hard
⊣ 3066 Minimum Operations to Exceed Threshold Value II
Medium
⊣ 3080 Mark Elements on Array by Performing Queries
Medium
⊣ 3081 Replace Question Marks in String to Minimize Its Value
Medium
⊣ 3092 Most Frequent IDs
Medium
⊣ 3112 Minimum Time to Visit Disappearing Nodes
Medium
⊣ 3123 Find Edges in Shortest Paths
Hard
⊣ 3170 Lexicographically Minimum String After Removing Stars
Medium
⊣ 3264 Final Array State After K Multiplication Operations I
Easy
⊣ 3266 Final Array State After K Multiplication Operations II
Hard
⊣ 3275 K-th Nearest Obstacle Queries
Medium
⊣ 3286 Find a Safe Walk Through a Grid
Medium
⊣ 3296 Minimum Number of Seconds to Make Mountain Height Zero
Medium
⊣ 3318 Find X-Sum of All K-Long Subarrays I
Easy
⊣ 3321 Find X-Sum of All K-Long Subarrays II
Hard
⊣ 3341 Find Minimum Time to Reach Last Room I
Medium
⊣ 3342 Find Minimum Time to Reach Last Room II
Medium
⊣ 3362 Zero Array Transformation III
Medium
⊣ 3377 Digit Operations to Make Two Integers Equal
Medium
⊣ 3408 Design Task Manager
Medium
⊣ 3462 Maximum Sum With at Most K Elements
Medium
⊣ 3478 Choose K Elements With Maximum Sum
Medium
⊣ 3505 Minimum Operations to Make Elements Within K Subarrays Equal
Hard
⊣ 3507 Minimum Pair Removal to Sort Array I
Easy
⊣ 3510 Minimum Pair Removal to Sort Array II
Hard
⊣ 3572 Maximize Y‑Sum by Picking a Triplet of Distinct X‑Values
Medium
⊣ 3594 Minimum Time to Transport All Individuals
Hard
⊣ 3604 Minimum Time to Reach Destination in Directed Graph
Medium
⊣ 3607 Power Grid Maintenance
Medium
⊣ 3620 Network Recovery Pathways
Hard
⊣ 3645 Maximum Total from Optimal Activation Order
Medium
⊣ 3650 Minimum Cost Path with Edge Reversals
Medium
⊣ 3691 Maximum Total Subarray Value II
Hard
⊣ 3767 Maximize Points After Choosing K Tasks
Medium
⊣ 3780 Maximum Sum of Three Numbers Divisible by Three
Medium
⊣ 3781 Maximum Score After Binary Swaps
Medium
⊣ 3815 Design Auction System
Medium