# Coupon Collector's Problem # Upper Bound: O(n*ln n) def collector(): var coupons, draw, N coupons = 0 while 0 <= coupons and coupons < N: tick 1 # draw = unif(0,N-1) draw = rand(N) draw = draw + 1 if draw > coupons: coupons = coupons + 1