|
|
|
|
|
by rugina
796 days ago
|
|
We, humankind managed to get a good optimisation for this problem by using spaces between words.
When trying these algorithms for searching a word in a string of text, I was surprised how little they could improve vs just skipping to the next word. |
|
Also if you look at algorithms like Boyer-Moore, they effectively DO skip spaces, but do so in a manner that is language / content agnostic. (https://www-igm.univ-mlv.fr/~lecroq/string/node14.html)