Sir i ave two questions
1)why we use count here why it is used.
2) temp->children.count(ch).what this stmt. do.
3)
Doubt in codeof Trie
-
This count data member of Trie can be used to save the count of total words present in the Trie data Structure.
-
temp->children.count(ch) here count is function for children which is a map, member of Node Structure, so for a map count is a function just like find(), where count() returns 1 if key is already present, return 0 when not present
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.