I'm sure there is a much cleaner way to do this, but I think this works the way you described
x = seq(1,100,by=1);x
iterations = 0
customer = 1
while(customer<=100){
iterations = iterations + 1;
rand = sample(x[1]:x[length(x)],1);
if(customer == rand){
customer = customer + 1
x <- tail(x, -1);
}
}
iterations
edit: I realized I might have misinterpreted how iterations are counted, my initial solution assumed you were trying one coat at a time; if the problem counts distributing a random coat to everyone as one iteration, then this should work:
x = seq(1,100,by=1);x
y = sample(x,100,replace=FALSE);y
iterations = 0
while(length(x)>0){
x <- x[!(x==y)];x
y = sample(x,length(x),replace=FALSE)
iterations = iterations + 1
}
iterations