function  A= sort_oe (A)   % Odd-even transposition sort
 n = length(A);
 for ii= 1:n 
  if mod(ii,2)==1
    for jj=1:2:n-1
       if (A(jj) > A(jj+1))
          temp=A(jj);
          A(jj)=A(jj+1);
          A(jj+1)=temp;
       end
    end
  else
    for jj=2:2:n-1
       if (A(jj) > A(jj+1))
          temp=A(jj);
          A(jj)=A(jj+1);
          A(jj+1)=temp;
       end
    end
  end
end
