A naive implementation to swap adjacent digits in allowed times to find its maxim permutation.