> No, I am not trying to do that at all. The trie is built to contain
> only keywords. It can then be used to answer the question for the
> current character 'Is this character part of a candidate keyword?' and
> do this O(1). Candidate keywords are identified initially by the trei
> root returning a reference to the node representing the first
> character of the keyword rather than a null. (or, if you prefer, the
> node linked to the root by that character's edge)

I see.
This is kind of data structure that I don't know.

> This is what I meant by longer and longer subsequences. For example,
> once the subsequence cdfagb has been identified it is then impossible
> that a shorter subsequence exists that starts with the same word 'c'
> at the same location in the complete sequence. Logically the next
> possible shorter subsequence starts with the next word 'a'. Checks
> (result.size() > range.size()) on other 'c' start subsequences are
> redundant.

Very impressive! I spent half an hour at most on that program, and
didn't thought about it deeply. Obviously you are better expert in
it. :)

> Thank you for asking. I was not going to spend time on this if nobody
> was interested. I will make a start this evening and make sure there
> is sufficient debug output that you all can criticise it without
> ploughing through the source code.

It certainly not worth spending time on it, if you don't want.
I just wanted to see the trei.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to