Company: Texas_5aug
Difficulty: medium
ProcessArray Algorithm Problem Description Consider the following algorithm: Algorithm ProcessArray(arr, N) //arr is an array of N integers Step 1: Divide the array arr into two equal halves. (If N is an even number, divide them into equal halves; if N is odd, then let the first half have (N/2 + 1) elements and the second half have the rest of the elements) Step 2: Multiply every element of the first half by two Step 3: Multiply every element of the second half by three Step 4: Add corresponding elements of both arrays (if the two array sizes are not equal, consider the leftover element as it is) and save it as arr and repeat steps 1 to 3 until it has single elements in it Step 5: Print the final left-out elements in the arr as output Write a program that accepts N integers as input and implements the above algorithm as core logic. Read the input from STDIN and print the output to STDOUT. Do not write arbitrary strings anywhere in the program, as these contribute to the standard output