title: Min swaps for sorting list of consecutive integers
body: <p>The problem:</p>
  <blockquote>
  <p>You are given an unordered array consisting of consecutive integers <code>[1, 2, 3, ..., n]</code> without any duplicates. You are allowed to swap any two elements. You need to find the minimum number of swaps required to sort the array in ascending order.</p>
  </blockquote>
  <p>My solution/issue:</p>
  <p>My code does what it is supposed to; however, for large arrays it takes longer to run than allowed.</p>
  <pre><code>def minimumSwaps(arr):
      swaps = 0
      for num in range(1, len(arr)):
          if num != arr.index(num)+1: 
              arr[arr.index(num)] = arr[num-1]
              arr[num-1] = num
              swaps+=1
      return swaps
  </code></pre>
  <p>Any ideas/advice on how could I optimize this?</p>