algorithms.tutorialhorizon.com
Find two smallest elements in a given array | Algorithms
Given an array of integers, write an algorithm to find the two smallest elements in the array. Example: Int [] a = { 6, 8, 1, 9, 2, 10}; Output: 1, 2 Int [] a = { 6, 8, 1, 9, 2, 1, 10, 10}; Output: 1, 1