#include #include #include #include #define SIZE 1000 /* Input text: AAAAB Input word: AAAB s = AAAB#AAAAB find word in position 1 Input text: abcdbbbca Input word: bc // s = bc#abcdbbbca find word in position 2 find word in position 7 * * */ void zFunction(char *s, int z[]) { int n = strlen(s); for (int i=1; i r) l = i, r = i+z[i]-1; } } void PrintZ(char *s, int z[]) { int n = strlen(s); for (int i=0; i