Last Updated : 22 Aug, 2019

Which kind of traversal order trie gives the lexicographical sorting of the set of the strings?
(A) Preorder
(B) Postorder
(C) Level order
(D) Inorder


Answer: (A)

Explanation:
To print the string in alphabetical order we have to first insert in the trie and then perform preorder traversal to print in alphabetical order.

Quiz of this Question


Share your thoughts in the comments