39. RETURN RANDOM STRING FROM A FILE
• The number of strings known
• probability of each string = 1/(number of strings)
• easy!
40. RETURN RANDOM STRING FROM A FILE
• The number of strings known
• probability of each string = 1/(number of strings)
• easy!
• The number of strings unknown, we can read the file only once
• tricky