Pregunta de entrevista de Orange

coding question 2. String pattern matching , find occurrence of pattern in string