Paytm Online assessment
Anonymous User
924

Given an unsorted array nums[] of positive numbers from 1..n
use below operation as many time required to minimize the max value in the array

  1. select an index such that start<i<end
  2. select number k such that 0<k<nums[i]
  3. subs k to nums[i] and add k to nums[i-1]

Return the max vakue in the array

Comments (3)