10 lines
198 B
Text
10 lines
198 B
Text
|
|
procedure KnuthShuffle(a : array of Integer);
|
||
|
|
var
|
||
|
|
i, j, tmp : Integer;
|
||
|
|
begin
|
||
|
|
for i:=a.High downto 1 do begin
|
||
|
|
j:=RandomInt(a.Length);
|
||
|
|
tmp:=a[i]; a[i]:=a[j]; a[j]:=tmp;
|
||
|
|
end;
|
||
|
|
end;
|