예제 #1
0
 /**
  * @param $key
  *
  * @return mixed
  * @throws TypeException when the $key is not the correct type.
  */
 function remove($key)
 {
     $this->avl->remove(new Pair($key, null));
 }
예제 #2
0
 function testRemoveNonExistent()
 {
     $tree = new SplayTree();
     $tree->remove(0);
     $tree->add(1);
     $tree->remove(0);
     $this->assertCount(1, $tree);
     $this->assertFalse($tree->isEmpty());
 }