Question: This is to be done in Java using Sets (HashSet). The task is to find out how many people you typically need to meet before

This is to be done in Java using Sets (HashSet).

The task is to find out how many people you typically need to meet before you meet one person born each day of the year. You are assuming there are 365 days in a year (no leap years). This means a birthday can be represented by a random number from 1 - 365. Using a set, the task is to keep track of the birthdays you have already encountered. Run the whole trial 100 times to take an average.

THE END OUTPUT OF THE NUMBER OF PEOPLE will vary due to it being a random number but it should be in the 2000s (someone in the 2000 people ballpark).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!