We need to traverse the trees and compare their elements.
We could traverse each tree and store each of their different elements in two arrays. Then we sort the array and verify that they are identical.
Question/Assumption: What about the frequency of items? With the previous approach we do not take into account the fact that some items may be repeated a different nb of times
Why is a manhole round?
Il y a 12 ans
Aucun commentaire:
Enregistrer un commentaire