I have this problem to solve in my PHP project where some keywords (from a few hundreds to a few thousands, lengths can vary) need to be searched in a string about 100-300 characters long, sometimes o
How would you find the correct words in a long stream of characters? 开发者_如何学编程Input : \"The revised report onthesyntactictheoriesofsequentialcontrolandstate\"
Another question on SO brought up the facilities in some languages to hash strings to give them a fast lookup in a table. Two examples of this are dictionary<> in .NET and the {} storage structure