Find the second smallest integer in array
Problem statement Given an array of integers, find the second smallest integer in that array. Solution public class SecondSmallestInteger { public static int solve(int[] arr) { int smallest = Integer.MAX_VALUE; int secondSmallest = Integer.MAX_VALUE; ; for (int i = 0; i < arr.length; i++) { if (arr[i] < smallest) { . . . Read more