Assume there are N different cards, the question is how many cards will I need to draw out before i get a full set of cards. this is what i've got so far B=[1:N]; draws=0;
while B~= zeros(1,N);n=randi(N)if n==B(n)B(n)=0draws=draws+1;endend
When i run this it gives only 1 value of n and always give me count=1 but i want this process to repeat untill I have only of each cards
Best Answer