Skip to content
Related Articles

Related Articles

| | Question
  • Last Updated : 23 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

My Personal Notes arrow_drop_up