Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WordFinder redux ... String Searching

 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The wordfinder puzzle is already gone! I played a bit with a (possibly) faster string searcher. Back in the 80s I remember a lot of excitement about the Boyer-Moore search algorithm. It can be much faster than checking each position for a match, and gets even faster on longer search strings. Here's a description on Moore's Best Ideas page.

Rather than implement Boyer-Moore (which is awfully complicated) I took the first half of the algorithm from memory and made this.

with tester
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic