Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Firstsolution.txt #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions solutions/Firstsolution.txt
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@

In this scenario, it is likely that the guests will try to cheat in order to get a cup of water.
They may try to move cups around on the table or place multiple cups in the first or last position
in order to increase their chances of getting a filled cup.
A possible solution to avoid a deadlock would be to assign a specific order for the guests to place
their cups on the table. This could be done by assigning numbers to each guest and having them place
their cups in numerical order. This would ensure that only one cup is in the first and last positions
at a time, preventing guests from placing multiple cups in those positions.