Re: data structure for strings
From: Brian Inglis <Brian.dot.Inglis_at_SystematicSw.ab.ca>
Date: 2000/08/12
Message-ID: <qo5cps4mlmbcp07s2gj20m0hdeeiqbjipd_at_4ax.com>#1/1
Date: 2000/08/12
Message-ID: <qo5cps4mlmbcp07s2gj20m0hdeeiqbjipd_at_4ax.com>#1/1
On Sat, 12 Aug 2000 06:41:21 +0200, Simon Richter <geier_at_phobos.fs.tum.de> wrote:
>On Sun, 23 Jul 2000, Marc Tardif wrote:
>
>> If I have 130 words of up to 6 characters, in what kind of data structure
>> can I store these words for quick string comparison? In other words, if I
>> have an unknown word, I need to determine if it is like any of the 130
>> words. This data structure does not need to be expandable, the list will
>> always be the same 130 words.
>
>What about a binary search? You need 7.022 steps per search, which means
>comparing a maximum of 14 (8 steps + 6 chars/word) bytes.
>
> Simon
Thanks. Take care, Brian Inglis Calgary, Alberta, Canada
-- Brian_Inglis_at_CSi.com (Brian dot Inglis at SystematicSw dot ab dot ca) use address above to replyReceived on Sat Aug 12 2000 - 00:00:00 CEST