AdjMatrix Graph: BFS done with distance calculation