Cognizant Interview Question

Advanced array and string concepts, sql