Consecutive Numbers:->RUBIX4 : Getting Wrong Answer

question->RUBIX4 Problem - CodeChef
my answer->CodeChef: Practical coding for everyone
getting wrong answer.i have taken two arrays both having same N elements and then changed one of the array in consecutive numbers,and then mathed both array .the number of differences in elements in both array is counted as number of change.also i have changed the array from both side(after sorting the second array) and taken min from both…