โ† Uber questions

Frog Energy and Destination Traversal

Filed under Uber

The question

A frog with limited energy starts at a source node with full energy. Moving between nodes reduces energy by 1 and increases time by 1. Energy drinks at some nodes replenish energy. If energy drops to 0, the frog dies. Find the minimum time to reach the destination node, or return -1 if impossible.

No write-up yet. Related questions below have one.

Related Uber questions

Collected from public candidate posts and coding forums. Updated Nov 2026.