Cognizant interview question

pseudo code / coding questions