Company: Greener_16nov
Difficulty: medium
Merge Array Elements and Find Smallest Problem Description Let Array arr=(x1,x2,x3,...,xN), merge the elements as merge(x1,x2), merge(x3,x4),..., merge(xN-1,xN) and write a program to find and print the smallest number among the merged elements. Read the input from STDIN and print the output to STDOUT. Do not write arbitrary strings while reading the input or while printing, as these contribute to the standard output. Input Format The first line of input should consist of an integer N. The second input line should consist of N integers, each separated by a single white space. Output Format The only line of output should display the smallest number after merging elements of the given array as specified in the problem statement. Examples Example 1: Input: 10 33 52 40 45 23 51 24 67 78 94 Output: 2351 Explanation: Here, the array elements are 33, 52, 40, 45, 23, 51, 24, 67, 78, and 94. And after merging every two elements, we will get 3352, 4045, 2351, 2467, and 7894. Since 2351 is the sm