Added tests to verify the correct tree size after deleting single and multiple nodes.
testDeleteExistingKey(): Checks the tree size after single node deletion.
testDeleteMultipleKeys(): Checks the tree size after the multiple random node deletion.
testLargeTree(): Checks tree operations, search, delete, abd insert on large tree structure.
Added abstract declaration for setRoot() in the SplayTreeRotations.php as it references its child class implementation as static::setRoot() in both rotateLeft() and rotateRight()
Addendum to my #168,
Added tests to verify the correct tree size after deleting single and multiple nodes.
testDeleteExistingKey()
: Checks the tree size after single node deletion.testDeleteMultipleKeys()
: Checks the tree size after the multiple random node deletion.testLargeTree()
: Checks tree operations,search
,delete
, abdinsert
on large tree structure.Added abstract declaration for
setRoot()
in theSplayTreeRotations.php
as it references its child class implementation asstatic::setRoot()
in bothrotateLeft()
androtateRight()
Minor typo fixes
Reference
Data Structures and Algorithms in C++, 2nd Edition