InterviewSolution
Saved Bookmarks
| 1. |
Which of the following is true about the trie?(a) root is letter a(b) path from root to the leat yields the string(c) children of nodes are randomly ordered(d) each node stores the associated keysThis intriguing question originated from Trie topic in section Trie of Data Structures & Algorithms II had been asked this question during an online exam. |
|
Answer» RIGHT answer is (b) path from root to the leat YIELDS the string Easiest explanation - A trie is an ordered tree where (i) the root represents an empty string(“”) (ii) each NODE other than root is labeled with a character (III) the children of a nodes are lexicographically ordered (iv) the paths from the leaves to the root yields the strings. |
|