Find Second Largest Number in Array

In this tutorial, I am going to discuss the easiest way to find second largest number in array.

Given an array of integers. The array is unsorted. Write a java code to find second highest number in an array.

For example –

Input – arr[] = { 1, 9, 5, 2, 8, -1, 3, 55}

Output: 9

In this example, we have given an unsorted array of integers. The second largest number in this array is 9.