0 votes 0 votes If inorder traversing a tree results in E A C K F H D B G, the preorder traversal would return (a) FAEKCDBHG (b) FAEKCDHGB (c) EAFKHDCBG (d) FEAKDCHBG 8676rau asked Feb 24, 2019 8676rau 1.9k views answer comment Share Follow See all 15 Comments See all 15 15 Comments reply Shaik Masthan commented Feb 24, 2019 reply Follow Share in this question i relate pre-order and post order https://gateoverflow.in/2504/gate1994-8 after reading it, you may answer to this question ( i know this question relating pre-order and in-order ). If you still didn't get it after reading the answer, then comment ! by the way, option B is the answer !! 0 votes 0 votes abhishekmehta4u commented Feb 25, 2019 reply Follow Share @ shaik Why not option a is true . 0 votes 0 votes Shaik Masthan commented Feb 25, 2019 reply Follow Share in the picture you took option b but not option a, right? 0 votes 0 votes abhishekmehta4u commented Feb 25, 2019 reply Follow Share Yes, i.e why not option b ?? 0 votes 0 votes Shaik Masthan commented Feb 25, 2019 reply Follow Share I also commented option b as answer ! 0 votes 0 votes srestha commented Feb 25, 2019 reply Follow Share @Shaik Masthan why left and right both leaves are need t be grater than root in that GATE question? I know some question need intution, but my logic saying, if they havenot mentioned any order, then the tree can be anything and there can be more than one tree , from which we can get that post order traversal Isnot it? 0 votes 0 votes Shaik Masthan commented Feb 25, 2019 reply Follow Share Mam, comment on original question.. It is not search tree ( i.e., left is less than root and right is grater than root ). It's just ternary tree 0 votes 0 votes srestha commented Feb 25, 2019 reply Follow Share @Shaik Masthan I mean these two also can be valid tree Am I wrong? if these diagram correct, then I add these diagram in main question too 0 votes 0 votes srestha commented Feb 25, 2019 reply Follow Share Actually , logic always works right, than intution 0 votes 0 votes Shaik Masthan commented Feb 26, 2019 reply Follow Share those tree following post order but not preorder 0 votes 0 votes Shaik Masthan commented Feb 26, 2019 reply Follow Share mam, Note that, they defined pre-order also ! 0 votes 0 votes srestha commented Feb 26, 2019 reply Follow Share @Shaik Masthan it is not BST. So, Preorder shouldnot always increasing order 0 votes 0 votes Shaik Masthan commented Feb 26, 2019 reply Follow Share they defined pre order is 1 to 12 in the order respectively. moreover if it is even bst, we can't guarantee preorder is increasing sequence 0 votes 0 votes srestha commented Feb 26, 2019 reply Follow Share moreover if it is even bst, we can't guarantee preorder is increasing sequence yes, inorder sequence increasing order. I missed it. but they havenot mentioned the term "respectively" they defined pre order is 1 to 12 in the order respectively. 0 votes 0 votes Shaik Masthan commented Feb 26, 2019 reply Follow Share even though they didn't mention the teem " respectively ", you can get it by the given statement lines. 0 votes 0 votes Please log in or register to add a comment.