|
|
back to boardQuestion Posted by SKYDOS 19 Jul 2010 20:10 Is it possible to solve this problem using suffix tree? or it will get MLE? Re: Question I solved it with std::set. Just use lower_bound() and upper_bound() functions. Applying lower_bound() is quite straightforwardly(yourSetObject.lower_bound(string)), but upper_bound() requires additinal {max_word_len-string.len} 'z' symbols. Read documentation and you will understand why. That's all! Re: Question I am using C# and dont really know if there is something like lower_bound(), thats why I am asking about suffix tree/array :) |
|
|