% Los programas son para fines educativo y se ofrecen para uso publico en educación
% Maestria en Ciencias de la Computación.
% Dr. Carlos Barrón Romero
% Septiembre de 2018
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function revolver(lo, hi)
global A;
n_dt = hi - lo;
for i = lo:(hi - 1)
    j = fix(rand()* (n_dt - i)) + i;
    %  swap A(i) with A(j)
    tmp = A(i);
    A(i) = A(j);
    A(j) = tmp;
    i = i + 1;
end
