while the list is out of order (ooo){ int i = rand(n); int j = rand(n); swap the ith and jth values in the list }
iterate n-1 times { for the ith element (from first to last-1) { if (out of order (relative to the next element) swap ith and ith+1th values, ith and next value? } }