Minimum time for a frog with limited energy to reach destination
Filed under Uber
The question
A frog starts at a source node with full energy. Traversing an edge decreases energy by 1 and increases time by 1. Energy drinks at some nodes replenish energy. If energy reaches 0, the frog dies. Determine the minimum time to reach the destination, or return -1 if unreachable.
No write-up yet. Related questions below have one.
Related Uber questions
Collected from public candidate posts and coding forums. Updated Nov 2026.