notes for BFS in binary trees