Line maze solver/w shortest path algorithm

hello every one....
I am trying to make a line maze solver with the shortest path algorithm
and I need a little help I have attached the code please have a look at it and help me out
and please tell me if I can do anything to replace the 999999999999999999999999999999
in my code

Thanks in advance to anyone who tries to help me out

line_maze_solver_shortest_path_algorithm.ino (2.78 KB)

You are going to need some datastructures to represent the maze. Is that what the path thing is for?

char path[999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999]

I don't think my PC even has enough memory to hold that array, and it has 8,000,000 times as much memory as a Uno.

i have changed the 99999999999999999999999999999999999999999999999999999999999 to 500

AwesomeDeepesh:
i have hanged the 99999999999999999999999999999999999999999999999999999999999 to 999

And? What happened?

please refer to this website

I got the algorithm from here and I am not able to complete it...
I have fixed some parts of the code please review it
I am having trouble with the cancellation part

please review my updated code

line_maze_solver_shortest_path_algorithm.ino (2.72 KB)

The code you posted does what? How does that differ from what you want?