Get Minimum Moves To Sort An Array Hackerrank Solution