Capgemini interview question

Needle in a haystack program