Lets say you are given a maze. For example:
# ########
# # #
# #### # #
# # # #
# # # ####
# # # #
# ### ## #
# # #
####### #
You can represent the maze in terms of any data structure you like, such as a graph, an array, etc. What would be the fastest/ most efficient algorithm for solving a maze of any arbitrary size?
The algorithms that first come to mind are Dijkstra's algorithm, BFS, and DFS. I'm not sure which these (or any other algorithms) would be "best" though.
For maze problems like the above the most widely used algorithm is A* algorithm which visits adjacent nodes is an optimal manner and hence prevents visiting all the graph. You can use manhattan distance as heuristics for the problem and solve this problem very effficiently.