Q2 Software Interview Question

Write a program to get the second max value