roughly you can traverse the trees with the same technique(pre-order,post order,etc) and compare the sequences that you will get(some of them i believe that is more suitable for your problem,i have to check it)The complexity for this task is O(n) per tree to construct the traversal sequence and then to compare the 2 arrays of sequences which can be done no under O(n)(intuition..you need at least to read all the elements per array)and the comparison can be done (naive) in O(n^2) . But this is a very rough "comparison" to find an isomorphism and may not be correct for some instances(because it has generally an underlying combinatorial structure).
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups-beta.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---
