Suffix tree help!
I'm a first yr Software Eng student & is finding it a difficulty implementing suffix trees. I only know binary search trees...
Been looking for an example code on the node structure & tree particullarly, and especially the insertion of nodes and traversing, but i can only find one website
However, i don't quite understand .... I wanna store a string and lists the string & its substrings...
> I wanna store a string and lists the string & its substrings
So look at each letter in your word, follow the branch which refers to that letter (or create it), then follow that branch with the remainder of the string.
Post your own code, not someone elses.
gee...thx for the link!
Will check out da code
concerning suffix trees -> Ukkonen's , Weiner's algorithms, are they something that u would normally write by urself or just rip it of somewhere like hash functions ?
Well you'll get a better understanding of it if you write your own. It depends on what your intent is really. Get it done fast? Use a library of code. Learn? Write your own. Something else? Make up your own answer!
ok...so i'm burdened with a programming project. :(
It's about extracting DNA seqs from a jumbled up file, letters G,A, T and C...
list all the substrings of the extracted strand and print its frequency alongside...
I've thought of suffix trees and recently discovered suffix arrays....
So, which one would be more appropriate?
I've heard tht suffix arrays consumes less memory, but how about the traversing/search time?
> ok...so i'm burdened with a programming project.
Gee, what did you expect when you enrolled as a "I'm a first yr Software Eng student ".
You're going to get some more programming projects in the future.
If you want to learn, then buckle down and do some work rather than surfing the net for half-baked answers and expecting others to fix those up for your own requirements.
Or just drop the course now and find something else to do in life.
> It's about extracting DNA seqs from a jumbled up file, letters G,A, T and C...
It's an assignment we've seen before.