Added dfs and bfs, and now sorting neighbour nodes