| | Question
Last Updated :
10 Jul, 2019
Which kind of traversal order trie gives the lexicographical sorting for the set of strings?
(A) Postorder
(B) Levelorder
(C) Inorder
(D) Preorder
Answer: (C)
Explanation: In Trie data structure , we store the string in such a way that there is one node for every common prefix . Therefore the inorder traversal over trie gives the lexicographically sorted set of strings.
Quiz of this Question
Please comment below if you find anything wrong in the above post
Share your thoughts in the comments
Please Login to comment...