Cognizant interview question

Solve a code in your known language