Hi Coders,
Today i gave online test of amazon hiring for sde1/2 on hackerearth. There were 2 questions out of which i am able to do 1 and a half.
Q1. Given a number, transform it in two numbers p1 and p2 such that sum of p1 and p2 is minimum.
Ex - 4523 - 59 ( 24 + 35) (Solved)
Q2. Given a array of integers of length N and a positive integer 2<k<N-1. Find minimum operations to make the array good. (array good is when A[i]<=A[i+k], i=0,1,2,3....N-1)
Ex. [2,4,1,3] - 2
Can anybody tell the solution and approach for 2nd one?
thanks