25 votes 25 votes Which of the following is/are correct in order traversal sequence(s) of binary search tree(s)? $3, 5, 7, 8, 15, 19, 25$ $5, 8, 9, 12, 10, 15, 25$ $2, 7, 10, 8, 14, 16, 20$ $4, 6, 7, 9, 18, 20, 25$ I and IV only II and III only II and IV only II only DS gatecse-2015-set1 data-structures binary-search-tree easy + – makhdoom ghaya asked Feb 12, 2015 • edited Dec 21, 2017 by kenzou makhdoom ghaya 7.3k views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply pankaj_vir commented Mar 24, 2018 reply Follow Share Inorder traversal gives nodes in non-decreasing order 2 votes 2 votes chauhansunil20th commented Nov 29, 2018 reply Follow Share In $Inorder$ traversal first left node is printed then root node and finally right node. $Left Node -> Root Node -> Right Node$ In a BST, $Left Node=< Root Node < Right Node$ Hence, Inorder always traverses the BST in ascending order. 1 votes 1 votes s_dr_13 commented Jul 17, 2020 reply Follow Share It is unbelievable that GATE is asking such questions 1 votes 1 votes Vishal_kumar98 commented Oct 24, 2020 reply Follow Share Look it as a whole paper point of view. I did the same mistake thinking like this for JEE questions. Try to solve the whole set of 65 questions and then in that you won't feel the same about this question. 3 votes 3 votes Please log in or register to add a comment.
Best answer 28 votes 28 votes In order traversal of key are always in ascending order. So, here I & IV th sequence are in ascending order so Option A is Answer. Rajesh Pradhan answered Aug 25, 2016 • edited Jun 13, 2018 by Milicevic3306 Rajesh Pradhan comment Share Follow See 1 comment See all 1 1 comment reply Sachin Mittal 1 commented Jan 17, 2017 reply Follow Share This is not quick, it's ONLY solution for this problem :D :) 17 votes 17 votes Please log in or register to add a comment.
12 votes 12 votes option A is right .. chek for left root right rule Anoop Sonkar answered Feb 12, 2015 Anoop Sonkar comment Share Follow See 1 comment See all 1 1 comment reply Sankha Narayan Bose commented Mar 24, 2018 reply Follow Share A... 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes Simply look for the sequences having ascending order, that's it! You'll get the answer! TheAnteamatter answered Jun 22, 2020 TheAnteamatter comment Share Follow See all 0 reply Please log in or register to add a comment.