Cognizant interview question

Arrays, Strings, Sorting and Searching