示例#1
0
 /**
  * @return mixed
  * @throws EmptyException when the tree is empty
  */
 function first()
 {
     return $this->avl->first();
 }
示例#2
0
 function testFindFirst()
 {
     $tree = new SplayTree();
     $tree->add(0);
     $tree->add(2);
     $tree->add(1);
     $expected = 0;
     $actual = $tree->first();
     $this->assertEquals($expected, $actual);
 }