|
I can pretty much handle the find, insert, remove functions, but I am not quite sure how to first, implement the trie, and how I can make it into a patricia tree.
Your task will be to write a class PatriciaTree, which will implement a patricia tree as discussed in class. This class will NOT be a template class. Your patricia tree will store keys of type String and leaf nodes that will indeed store the entire key of type String. Our PatriciaTree specification is as follows:
Abstract Description
Public Interface:
This class should have eight public member functions:}
A no-argument constructor that produces an empty trie.
The Big Three
A function insert which takes a String as a parameter, and inserts that String into the trie.
A function find which takes a String as a parameter, and returns the integer 1 if the parameter String is in the trie, and returns the integer 0 if it is not in the trie.
A function remove which takes a String as a parameter, and removes that String from the trie if it is in the trie.
|
|
|
|
|
|
|
// |