For 1. you need an in-order traversal. During the visit check to see
that each successive key is non-decreasing.

For 2. you need a post order traversal. During the visit swap the left
and right child pointers.

Now you can look up the standard algorithms for  these traversals.



On Jun 30, 3:34 am, vikas <mehta...@gmail.com> wrote:
> 1. write iterative program to find if a binary tree is binary search tree or
> not.
>
> 2. write iterative program to convert a binary tree into its mirror image.

-- 
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.

Reply via email to