DFS

Hai i am new to the world of competetive programming...I have just started to learn data structures...I would like to get an idea on how to solve the following programme...
Suppose i am given a maze and i have to reach a particular point in the graph....but there are many obstacles..say if the element in the maze is '|' then i cant move in the index and i can move only if the element in the array is '.' then how can i find out whether i can reach that particular point or not?
I know this is a silly questiion....but i just want to know how can i solve it using DFS or BFS...
Topic archived. No new replies allowed.