Minimize increment or decrement operations to make given Array elements consecutive
Given an array, arr[] of size N., The task is to perform minimum increment or decrement operations on the elements of the array, to make all the elements consecutive, Output the minimum sum of all the possible changes(addition and subtractions) required to do the same. Examples: Input: N = 5, arr[]