Boyer-Moore string search: Difference between revisions

m
A line of text was overflowing to next line.
(New post.)
m (A line of text was overflowing to next line.)
Line 226:
"needle need noodle needle",
"DKnuthusesandprogramsanimaginarycomputertheMIXanditsassociatedmachinecodeandassemblylanguages",
"Nearby farms grew a halfan acre of alfalfa on the dairy's behalf, with bales of all that alfalfa exchanged for milk."
};
 
Line 243:
}
</syntaxhighlight>
{{ out }}
<pre>
text1 = GCTAGCTCTACGAGTCTA
Line 249 ⟶ 250:
text4 = needle need noodle needle
text5 = DKnuthusesandprogramsanimaginarycomputertheMIXanditsassociatedmachinecodeandassemblylanguages
text6 = Nearby farms grew a halfan acre of alfalfa on the dairy's behalf, with bales of all that alfalfa exchanged for milk.
 
Found "TCTA" in 'text1' at indexes [6, 14]
Line 256 ⟶ 257:
Found "needle" in 'text4' at indexes [0, 19]
Found "and" in 'text5' at indexes [10, 46, 73]
Found "alfalfa" in 'text6' at indexes [3329, 8779]
</pre>
 
894

edits