text: A modified Naive Pettern Searching algorithn that is optimized for the cases when all characters of pattern are different
code: void search ( char pat [ ] , char txt [ ] ) { int M = strlen ( pat ) ; int N = strlen ( txt ) ; int i = 0 ; while ( i <= N - M ) { int j ;