Pergunta de entrevista da empresa Appian

Campus interview: Find the needle (substring) in the haystack (string).