recurse on left and right will do it and keep comparing the values On Tue, May 22, 2012 at 2:50 PM, atul anand <atul.87fri...@gmail.com> wrote:
> no need of creating another mirror tree > you just need to call the function func(root->left,root->right); > now left sub tree and right sub tree will be considered as if you are > checking 2 different trees > same code to check if 2 tree are structurally similar will work. > > On Tue, May 22, 2012 at 10:50 AM, algogeek > <dayanidhi.haris...@gmail.com>wrote: > >> How to check if a given binary tree is structurally symmetric ie. the >> left sub tree should be mirror image of right sub tree and vice-versa. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algogeeks@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> >> > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.