Accenture Interview Question

string matching and arrays and some puzzles.