Documentation ¶ Index ¶ type Result func Kmp(text string, word string) Result Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Result ¶ type Result struct { // contains filtered or unexported fields } func Kmp ¶ func Kmp(text string, word string) Result Kmp Function kmp performing the Knuth-Morris-Pratt algorithm. Prints whether the word/pattern was found and on what position in the text or not. m - current match in text, i - current character in w, c - amount of comparisons. Source Files ¶ View all Source files kmp.go Click to show internal directories. Click to hide internal directories.