codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  patricia tree  newGuy123 at 21:07 on Tuesday, December 07, 2004
 

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.

  Re: patricia tree  tgreer at 00:15 on Wednesday, December 08, 2004
 

This forum probably has policies against doing homework assignments. Even if it doesn't, I would encourage you to try to learn this on your own. If you cannot complete the assignment, you need to get help from your instructor. Their job is, after all, to instruct students.



  Re: patricia tree  Gord T at 00:26 on Friday, December 08, 2006
 

This reply deserves a bump. Well said.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: Security - Code verify
•  Job @ EarlySail
•  Job @ EarlySail (perl)
•  IPC problem
•  Re: import contacts of msn/yahoo
•  Cookies and Threads C++
•  right justify a background in a table?
•  Help with Loop (C++/MFC)
•  Help with Loop (C++/MFC)


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007