fullscreen
timer
qrcode
plickers
selector
edit
reset

Greedy Algorithms (4)

COS 320 - Algorithm Design

Greedy Algorithms (4)

Google's Foo.bar Challenge

Group: Google's foo.bar challenge

You have maps of parts of the space station, each starting at a prison exit
and ending at the door to an escape pod.  The map is represented as a matrix
of 0s and 1s, where 0s are passable space and 1s are impassable walls.  The
door out of the prison is at the top-left (0,0) and the door into an escape
pod is at the bottom-right (w - 1, h - 1).

Write a function that generates the length of a shortest path from the prison
door to the escape pod, where you are allowed to remove one wall as part of
your remodeling plans.
s
t
×