#### Description of the problem <!--Please provide a clear and details information of the bug/data structure to be added.--> #### Example of the problem <!--Provide a reproducible example code which is causing the bug to appear. Leave this section if the problem is not a bug.--> #### References/Other comments [Reference](https://www.geeksforgeeks.org/trie-insert-and-search/)
Activity
czgdp1807 commentedon Mar 29, 2020
Please propose an API for the Trie data structure.
HarsheetKakar commentedon Mar 29, 2020
TrieNode:
The class
TrieNode
will extend from Node base class to represent a node inTrie
Attributes:
children
- dict() to represent children of the nodeis_end
- Boolean to represent leaf position.Trie:
The class
Trie
to represent data structure Trie.Attributes:
root
- startNode
.Methods:
insert(string)
: insert a string in Triesearch(string)
: takes string and returns True if full match else returns list of partial matchesdelete(string)
: delete a string from Trieczgdp1807 commentedon Mar 30, 2020
Why do we need this?
czgdp1807 commentedon Mar 30, 2020
Can we go for python dict with
TrieNode
as key?czgdp1807 commentedon Mar 30, 2020
Why we need this too?
HarsheetKakar commentedon Mar 30, 2020
sure, would be better
HarsheetKakar commentedon Mar 30, 2020
not if we use dict
HarsheetKakar commentedon Mar 30, 2020
not really needed.
robotjellyzone commentedon Apr 10, 2020
Hi @HarsheetKakar are still working on this ? Any update ?
Update functions codezonediitj#229
API and some functions working codezonediitj#229
Insert delete codezonediitj#229
Functions done codezonediitj#229
Raises Api update codezonediitj#229
API implemented codezonediitj#229