Cognizant Interview Question

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