Advertisement
Guest User

Untitled

a guest
Oct 5th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.19 KB | None | 0 0
  1. Procedure SelectionSort(A)
  2.     for i=1 to n
  3.         pos=i
  4.         for j=i+1 to n
  5.             if (A[j] < A[pos])
  6.                 pos=j
  7.             end if
  8.         end for
  9.         eemp = A[i];   A[i] = A[pos];   A[pos] = temp
  10.     end for
  11. end procedure
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement