News for hackers. Stuff that matters.
Re:Dictionary of Algorithms and Data Structures (1998) by amelius on Friday October 21, 2016 @12:50PM (#12762056)
Okay, now I understand what you meant.

But what if a search needs to be fast regardless of whether the string has been searched for before?

Re:Dictionary of Algorithms and Data Structures (1998) by justin66 on Friday October 21, 2016 @12:57PM (#12762156)
I thought the thing peff briefly described above sounded pretty good. The worst case complexity, if I'm visualizing it right, would be the length of the string you were comparing.

I remember some discussion of this in previous HN threads but I don't know what it was about...