a mouse is trapped in a labyrinth.. and he has to find the cheese!
the input is W and H (height and width), and a graph like this one:
##...# C###.. ...... .####. .....M
i'm supposed to calculate the shortest amount of steps he needs to make to get to the cheese (C).
also if he cannot get to the cheese you gotta print "impossible"...
while i 've found a way to flood-fill the map to find if it's even possible to get to the cheese, i still can't find a good algorithm to find the shortest path. i've read about those shortest path things but i kinda don't get it... help!!! pleaseee :).