Time Complexity of the fastest solution


#1
  1. what is the time complexity of the fastest solution provided.
  2. how does it ensure that the number of swaps are minimum.