can anyone tell me the best way to do a program for listing all the non common elements of two binary balanced trees? which are the best data structures to use in this case?
thanx!
can anyone tell me the best way to do a program for listing all the non common elements of two binary balanced trees? which are the best data structures to use in this case?
thanx!
> which are the best data structures to use in this case?
My guess would be a balanced binary tree, since that is what you start with.
Maybe traverse both at the same time and report the differences?
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.