How will inorder, preorder and postorder traversals print
the elements of a tree?

Answer Posted / meenakshi

INORDER:: LNR
PREORDER:: NLR
POSTORDER::LRN
here L stands for the leftnode of the tree R stands for the
right node of the tree and N stands for the root node of
that tree.

Is This Answer Correct ?    10 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is better hashmap or hashtable?

472


How do you do a mergesort?

480


Why do we need sorting?

479


Difference between abstract data type, data type and data structure?

622


There are 2 int type array data type. One is containing 50 elements, and another one is containing 30 elements. Can we assign the array of 50 elements to an array of 30 elements?

846






Define collision in hashing?

493


What is binary tree used for?

508


What is the meaning of anonymous array? Explain with an example?

746


Parenthesis is never required in postfix or prefix expressions, why?

519


what is Singly Linked list?

582


What is difference between array and string?

526


Discuss how to implement queue using stack.

517


What is difference between arraylist and linkedlist?

546


What is the difference between arrays sort and collections sort?

438


How many types of searching are there in data structure?

431