HK for Graphs

The functions bfs and dfs don't work properly and i followed the steps from the lab guide.can you please take a look upon the code and tell my where is the mistake.if i should try a different aproach ,something more easy like a static arrays or anything because I'm out of ideas.