dsa3 min read
Process Tasks Using Servers
Assign tasks to available servers using two heaps: one for free servers and one for busy servers sorted by free time.
Read →
webcoderspeed.com
1276 articles
Assign tasks to available servers using two heaps: one for free servers and one for busy servers sorted by free time.
Calculate trapped water in a 3D height map using BFS with a min-heap to process cells from shortest boundary inward.
Find minimum time to swim from top-left to bottom-right in a grid where time = max elevation on the path.
Find the smallest range that contains at least one element from each of K sorted lists using a sliding K-way merge.
Find the nth super ugly number with prime factors only from a given list using K-pointer dynamic programming.