Lucidity interview question

Rainwater Trapping problem and a shortest path problem based on Dijkstra’s algorithm.