Question: You are given an array A of N ( > = 3 ) distinct integers. Your friend Allen removes only 2 elements from this array,
You are given an array A of N distinct integers. Your friend Allen removes only elements from this array, adds a value to all the remaining elements shuffles the array and leaves the newly formed array G for you. Your task is to return the minimum possible value that Allen had added to each element of array A to get to array G It is guaranteed that atleast one such value which will be greater than will always exist.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
