709. Friendly Challenges
Shagundeep and Mayank are two friends who love to challenge each other. In a recent challenge, Mayank provides Shagundeep with an array A of n numbers and integer k. Shagundeep has to find minimum number of moves so that the following condition is satisfied: every element except first should be k more than its previous element. In one move Shagundeep can change any element of the array to any integer he wants.