Find the Second Maximum and Second Minimum Elements of an Array

This program comes under the array operations in Data Structure. In this program, we will create an array take input from the user, and sort the array then we’ll find the second maximum number and second minimum number. For sorting, I have used an insertion array inside the program.