Cognizant interview question

General coding & aptitude, General HR