GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Notizen

Mod 4

Sarvesh Kakodkar MADF graduate Englisch 1 Seite

Inhalt der Notizen (1)

Seite 1

String matching

1) Bruteforce algorithm

Algorithm BruteForceMatch(T,P):

Input: Strings T (text) with n characters and P (Pattern) with m characters

Output: Starting index of the first substring of T matching P, or an indication that P is not a substring of T

//Outer loop is indexing throught all possible starting indices

//Inner loop indexing through each character of the pattern

for i j while (j j if j=m then

return i

return "There is no substring of T matching P."

Informationen

Beschreibung
graduate MADF Notiz am Mod 4, erstellt von Sarvesh Kakodkar am 26/05/2015.
Erstellt von
Sarvesh Kakodkar
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck