- Joined
- Sep 20, 2022
- Messages
- 279
- Reaction score
- 40
I'll get the ball rolling.
The Knuth-Morris-Pratt algorithm.
When I was learning assembly language, we had to code a string search. Start at i, try to match, if it fails, start at i+1 and so on.
It never occured to me that it could be improved. Until I found something called a "precomputed string search" in a book. Aka the KMP algorithm.
It made me ask, "Why didn't I think of that?", and "What else am I overlooking?"
The Knuth-Morris-Pratt algorithm.
When I was learning assembly language, we had to code a string search. Start at i, try to match, if it fails, start at i+1 and so on.
It never occured to me that it could be improved. Until I found something called a "precomputed string search" in a book. Aka the KMP algorithm.
It made me ask, "Why didn't I think of that?", and "What else am I overlooking?"