Open In App

| | Question

Last Updated : 10 Jul, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

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


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads