Cognizant Interview Question

Coding in array problems and strings