Beispiel #1
0
  @Test
  public void testBFS3() {

    List<Tree> lst = TreeUtils.breadthFirst(big);
    Iterator<Tree> it = TreeUtils.breadthFirstIterator(big);
    compareListIterator(lst, it);
  }
Beispiel #2
0
 @Test
 public void testBFSList() {
   compareListIterator(TreeUtils.breadthFirstIterator(src), "a", "b", "e", "c", "d");
   compareListIterator(
       TreeUtils.breadthFirstIterator(dst), "a", "f", "i", "b", "j", "c", "d", "h");
   compareListIterator(
       TreeUtils.breadthFirstIterator(big),
       "a",
       "b",
       "e",
       "f",
       "c",
       "d",
       "g",
       "l",
       "h",
       "m",
       "i",
       "j",
       "k");
 }