• Home
  • Learn
  • Feed
  • Ladder
  • Saved
← Roadmapsall heaps problems
⛰️

Heaps

Top-K, k-way merge, two-heaps median, scheduling.

5 stops · 95 problems0/65 on the path done
next ▸ Kth Largest in a StreamSilver · 1050
1

Top-K

0/16 of 25you are here

Kth largest/smallest, k closest, top frequent.

○Kth Largest in a Stream○Sort Characters by Frequency○Kth Largest In Array○K Weakest Rows Indices○K Weakest Rows in Matrix○Top K Frequent Words○K Weakest Rows in a Matrix○Sum Of The Top K○K Largest In Descending Order○K Weakest Rows○Kth Smallest Value○K Closest Numbers○Top K Frequent Sorted○K Closest Elements○Kth Largest Distinct Value○Top K Students By Score+9 in the arena
2

Greedy with a heap

0/13

Stones, ropes, IPO, furthest building.

○Last Stone Weight○Minimum Cost to Connect Sticks○Connect Ropes Minimum Cost○Connect Ropes Min Cost○Minimum Cost To Connect Ropes○Furthest Building You Can Reach○IPO Maximum Capital○Operations to Halve Array Sum○Maximize Capital (IPO)○Maximize Capital From K Projects○IPO: Maximize Capital○Furthest Building Reachable○IPO Maximize Capital
3

K-way merge

0/6

Merge k lists, smallest range, k pairs.

○Merge K Sorted Arrays○Find K Pairs With Smallest Sums○K Pairs with Smallest Sums○Smallest Range Covering All Lists○Smallest Range Covering Lists○Smallest Range Covering K Lists
4

Scheduling & median

0/14

Task scheduler, median stream, events, CPU.

○Running Maximum Stream○Median Of An Array○Task Scheduler Intervals○Median Of Two Arrays○Find Median from Data Stream○Single Threaded CPU Order○Running Medians of a Stream○Median Across Two Sorted Arrays○Reorganize String○Running Median of a Stream○Running Median○Median From Data Stream○Task Scheduler Time○Find Median From Stream
5

More Heaps

0/16 of 37

Everything else in this category — keep climbing.

○Sort By Increasing Frequency○Sort An Almost K-Sorted Array○Take Gifts From the Richest Pile○Meeting Rooms II Count○Sort A K Sorted Array○Product Of The Two Largest○Sort a Nearly Sorted Array○Meeting Rooms II○Sort An Almost Sorted Array○Maximum Sum After K Negations○Ugly Number II○Total Cost To Hire K Workers○Heaviest Collision Remainder○Minimum Set Size To Halve○K Smallest Pair Sums○K Smallest Cross Sums+21 in the arena
🏁Finish line