A benchmark comparing the naive (brute force) and Knuth-Morris-Pratt (KMP) string searching algorithms across several scenarios to show when and why KMP wins. - ...
let rec check_match_at (#a: eqtype) (text: Seq.seq a) (pattern: Seq.seq a) (s: nat) (j: nat{j <= Seq.length pattern}) let matches_at_dec (#a: eqtype) (text: Seq.seq a ...