Amazon Interview Question

Count minimum swaps with a given array