dsa3 min read
Trapping Rain Water II
Calculate trapped water in a 3D height map using BFS with a min-heap to process cells from shortest boundary inward.
Read →
1575 articles
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.
Find minimum fuel stops to reach the target by greedily selecting the largest available fuel stations when running low.