replaced LinkedList by Queue for Graph BFS