Showing posts with label algorithms. Show all posts
Showing posts with label algorithms. Show all posts

Sunday, November 27, 2011

Probability Again

Source: Surprises by Felix Lazebnik


Problem:
Write two distinct integers, one on a card, and put two cards on the table face
down. You can pick any of the two, look at it, and then you have to guess whether
the other number is larger or smaller. Prove that you have a strategy to make a
correct guess with probability strictly greater than 1/2.

The ten digit number

Source: Bhupesh Bhargav, Algo Embedded Systems

Problem:
Find a 10-digit number, where the first figure defines the count of zeros in this number, the second figure the count of numeral 1 in this number etc. At the end the tenth numeral character expresses the count of the numeral 9 in this number.

Egg Breaking strategy


Source: Google Interview Puzzle

Problem:
With two eggs and a building with 100 floors,
what is the optimal strategy for finding the lowest floor at which an egg
will break when dropped?