Write delete() method and test for a custom Binary Search Tree
$30-250 USD
Cerrado
Publicado hace alrededor de 8 años
$30-250 USD
Pagado a la entrega
I have a hybrid of a binary search tree that was written specifically for domain names and related data. There are already insert, find, and compare methods, but I now have a need of delete functionality. I would like a delete method as well as a test fixture (nothing fancy, a simple main() will suffice) to demonstrate the functionality. This will be used in a large scale system
Using another library (STL, boost) to implement the data structure is not an option.
Rough idea for test fixture pseudocode:
read in file of domain names (could be [login to view URL] as well as [login to view URL], one per line)
for (i = 0; i < cmdline_arg_inserts; i++){
pop domain_name from the list;
create entry object based on domain_name;
[login to view URL](domain_name, entry, Parse_order++);
}
for (i = 0; i < cmdline_arg_deletes; i++){
[login to view URL](domain_name);
}
if (cmdline_arg_inserts > cmdline_arg_deletes){
cout remaining entries
If you have a different idea for a test fixture, I am open to new ideas there. The functionality of the delete() method is what is more important.