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
How to fill element (initialize at once) in an array?
Explain merge sort algorithms.
What is array and its types with example?
What is difference between hashmap and linkedhashmap?
Difference between calloc and malloc in data structures?
What stack means?
How can you insert a node in a random location of the linked list?
What is a spanning tree in data structure?
What is the difference between sorting and classifying?
Why sorting algorithms are important?
Does treeset allow null values?
Which is better merge or quick sort?
A lot of data structures related programs related to only trees and graphs, like the diameter of a tree, removing the loops in a graph etc.
What are the tasks performed during inorder traversal?
Is hashmap fail safe?