Minimum steps to convert an Array into permutation of numbers from 1 to N
Given an array arr of length N, the task is to count the minimum number of operations to convert given sequence into a permutation of first N natural numbers (1, 2, ...., N). In each operation, increment or decrement an element by one.Examples: Input: arr[] = {4, 1, 3, 6, 5} Output: 4 Apply decremen