Bloomberg logoBloomberg
Coding·60 minMembers

Gas Tank Grid Reachability

Members only

Walk a 2-D grid from a start to a goal cell with a finite gas budget. Some cells are obstacles, some refuel you to a fixed capacity. Decide whether the goal is reachable. The trap is that gas adds a s...

SWE
bfs
grid
state-machine
hard
Frequency
Single report
Last asked
2026-01-31
Stage
onsite-coding

Log in to continue reading the full content

Comments

Sign in to join the discussion
Loading...