Which algorithm would you use to search short substrings in short texts? By short I mean 5-10 characters for substring and 255 for the string. I'm thinking about choosing algorithm depending on input data length. Which algorithm is better for longer inputs?
+5
A:
Try Turbo-BM. However, IMO, with such short strings usual linear scan will suffice.
Anton Gogolev
2009-05-25 10:07:07
A:
You can try Suffix Trees or Suffix Arrays. Both depend on the pattern length.
Yuval F
2009-05-25 10:12:47