Minimum sum of two numbers formed from digits of an array in O(n)
Given an array of digits (values are from 0 to 9), find the minimum possible sum of two numbers formed from digits of the array. All digits of the given array must be used to form the two numbers.Examples: Input: arr[] = {6, 8, 4, 5, 2, 3} Output: 604 246 + 358 = 604Input: arr[] = {5, 3, 0, 7, 4} Ou