Cognizant interview question

Arrays in a string coding question