3) He makes a list X of all unique letters in the codes of these 5 dishes
4) Guest picks a random dish. There are a few things that can happen:
A) The code of that dish has a letter that's not on the list X. Ignore.
B) All letters of that dish are on the list X. Two options:
B1) The dish the guest picked is one of the 5 special.
B2) The dish the guest picked is not one of the 5 special.
The first question is - how often does B2 happen?
The answer to the second question of that problem is obvious, you don't need to write any code.
2) He randomly picks 5 of them as "special"
3) He makes a list X of all unique letters in the codes of these 5 dishes
4) Guest picks a random dish. There are a few things that can happen:
The first question is - how often does B2 happen?The answer to the second question of that problem is obvious, you don't need to write any code.