alonsovidales / facebook-programming-challenges

This is a compilation of possible questions to be solved in order to be hired by Facebook
159 stars 54 forks source link

bar game, some thing wrong with test case 1 #4

Open madan-ram opened 11 years ago

madan-ram commented 11 years ago

9 and 8 considered highest number hence they cannot be 3rd highest number , hence the chance of 9 & 8 is being 3rd biggest is not possible. pl can you justify your answer.

ex in case of 9,8,2 and 1 is choice then 2 will be the 3rd biggest.

Nivl commented 10 years ago

No because the 2 and 3 are in the same list:

List for the first person is {2 5 3} , {8 1 6} for second and {7 4 9}

So the lowest number the first person can pick is 2, for the second it's 1, and for the third it's 4

Same for 8 and 9: If the first person pick 5, the second 8, and the third 9, the 8 will only be the second biggest and 9 will be the third biggest.