Question 9 In Data Structures and Algorithms, which of the following statements about the...
Netradyne technical mcq question, verified with a worked answer. Free to practise - no sign-up.
In Data Structures and Algorithms, which of the following statements about the Trie data structure are correct?
A key can be searched with O(M+N) time complexity by using this data structure where 'M' is the maximum string length and 'N' is the number of keys in the trie.
A Trie node field isEndOfWord is used to distinguish the node as the end of a word node.
Every character of the input key is inserted as an individual Trie node when a node is being inserted into the Trie.
If the isEndofWord field of the last node is true while searching for a key, then the key exists in the trie.
Show answer & explanation
Accurate technical and quantitative evaluation based on foundational principles.
Step-by-step Derivation:
Step 1: Formulate problem conditions.
Step 2: Apply logical deduction.
Step 3: Conclude correct option.