I\'m looking for an algorithm which, given two circular permutations (the first and the last element are considered as adjacent), minimizes the number of adjacent swaps to pass