reset password
Author Message
darkzero2024
Posts: 7
Posted 13:27 Oct 25, 2017 |

When Duplicates are encountered do we need to throw an exception or can we ignore it as in the code will run but the duplicate is just not added into the tree.
Right now my tree skips over all duplicates 
wondering if I need to add the exception.

kknaur
Posts: 540
Posted 13:33 Oct 25, 2017 |

Exception is probably a good idea, the user of your data structure would need to know that a duplicate was attempted to be added to the tree.

boxxydog
Posts: 11
Posted 14:06 Oct 25, 2017 |

Do we make an duplicate exception class to call duplicate exception or is that not allowed because it is not one of the given classes in the instructions?

kknaur
Posts: 540
Posted 14:08 Oct 25, 2017 |

You may make whatever exception classes you need.