Diffing "freqsort 3" and "randperm"

Title: freqsort 3 randperm
Author: Alex Backer Alex Backer
Submitted: 2003-11-04 10:21:33 UTC 2003-11-04 10:26:12 UTC
Status: Passed Passed
Score: 100.0 89.0
Result: pass pass
CPU Time: 0.221 0.26
Code:
c=[];
for i=1:length(b)
    c = [c a(i)*ones(1,b(i))];
c = [c a(i)*ones(1,b(i))];
end
while any(~(diff(c)))
    [y,i] = sort(rand(1,sum(b)));
    c=c(i);
c=c(randperm(sum(b)));
end