1 votes 1 votes Data structure BST I thinks answer is 2 either ascending or descending mehul vaidya asked Mar 11, 2018 mehul vaidya 239 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
2 votes 2 votes at first you understand total no of node is 3 and resulting height is 2. abhishekmehta4u answered Mar 11, 2018 abhishekmehta4u comment Share Follow See 1 comment See all 1 1 comment reply mehul vaidya commented Mar 11, 2018 reply Follow Share Thanks , I just worked on this question and found another approach every time when you insert new node you have to select either minimum or maximum element ,i.e you have 2 choices each time, For this question step 1 (root node) either choose 11 or 17 - 2 choices lets say i choose 11 . Now remaining elements 11,12,13, 14, 15, 16 step 2 (level 1) either choose 11 or 16 - 2 choices lets say i choose 11 . Now remaining elements 12,13, 14, 15, 16 step 3 (level 2) either choose 12 or 16 - 2 choices lets say i choose 16 . Now remaining elements 12,13, 14, 15 step 4 (level 3 ) either choose 12 or 15 - 2 choices lets say i choose 12 . Now remaining elements 13, 14, 15 step 5 (level 4 ) either choose 13 or 15 - 2 choices lets say i choose 15 . Now remaining elements 13, 14 step 5 (level 5) either choose 13 or 14- 2 choices lets say i choose 13 . Now remaining elements 14 for 14 only 1 choice i.e. choose it if you multiply all choices 2 * 2 * 2 * 2* 2 * 2 = 2 ^ 6 2 votes 2 votes Please log in or register to add a comment.
0 votes 0 votes see this link https://gateoverflow.in/39586/gate2016-2-40 Ananya Jaiswal 1 answered Mar 11, 2018 Ananya Jaiswal 1 comment Share Follow See all 0 reply Please log in or register to add a comment.