Diffing "randperm" and "randperm 2"

Title: randperm randperm 2
Author: Alex Backer Wes Hildebrandt
Submitted: 2003-11-04 10:26:12 UTC 2003-11-04 10:51:03 UTC
Status: Passed Passed
Score: 89.0 87.0
Result: pass pass
CPU Time: 0.26 0.26
Code:
c=[];
for i=1:length(b)
c = [c a(i)*ones(1,b(i))];
end
while any(~(diff(c)))
while any(~diff(c))
c=c(randperm(sum(b)));
end