0 votes 0 votes the number of binary trees with 3 nodes which when traversed in post order gives the sequence a,b,c is a)3 b)9 c)7 d)5 Sanjay Sharma asked May 14, 2016 Sanjay Sharma 9.1k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 3 votes 3 votes I think 5 and trees are Postorder : Left Right Root Since C is last in given postoder In post order root is last So C root of trees A and B are placed so that ABC is postorder to make that either A is child of B or Left sibiling of B whose root is C shivanisrivarshini answered May 14, 2016 • selected May 14, 2016 by minal shivanisrivarshini comment Share Follow See 1 comment See all 1 1 comment reply smartmeet commented Nov 6, 2016 reply Follow Share Same question but instead of "post-order" what if there is"Pre-order"? 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes in order to get abc sequence their will be 5 binary tree possible . for that firstly u draw all unlabel binary tree and then fill accordingly by which u got postorder abc so here ans is d rajan answered May 14, 2016 rajan comment Share Follow See 1 comment See all 1 1 comment reply Swarnava Bose commented Nov 20, 2021 reply Follow Share What if it is preorder instead of post order ? Will answer be same ? 0 votes 0 votes Please log in or register to add a comment.