Developer-Students-Club-MAIT / cool_code_snippets

This is a repository for adding not so popular/known but very useful and cool code snippets in any language or framework that the community might benefit from
MIT License
12 stars 16 forks source link

Create dictionary_from_trie_C++.md #27

Closed dwij2212 closed 4 years ago

dwij2212 commented 4 years ago

Title/Heading

Dictionary from trie Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes: #24

Type of change

Please delete options that are not relevant. (including this line)

Checklist:

dwij2212 commented 4 years ago

@deepika-rana I have included some pre-built words but how am I supposed to get the contents of an entire dictionary? To add some words the user needs to just add the line insert(root, word, meaning);. To search the user needs to just add a line cout<<search(root, "word_to_search");

deepika-rana commented 4 years ago

Okay, to search for a word the string is declared in the code itself. You can rather custom input a string cin>>word_to_search if you wish.