add breadth first traversal using list as a queue