Cognizant interview question

To solve a coding problem. 2nd largest element in an array