Algorithm · Google · Medium
Requirements Main problem Given a grid of heights, move from the start cell to the end cell using only the four neighboring directions. Define a path's cost as the greatest cell value encountered on that path. Find the smallest cost that can be guaranteed by choosing an appropriate path. Follow-up: Network Delay Time variant Given a directed graph whose edges have weights, start from a specified source node and determine the largest shortest-path distance to any node. Return…
Checking your access…