Answer to http://stackoverflow.com/q/10018296/508537. This shows how you can auto-size a div to make it fit the browser window when the content might be quite large.
This is a recursive solution to minimize the worst-case scenario to solve the egg drop puzzle (see http://en.wikipedia.org/wiki/Dynamic_programming#Egg_dropping_puzzle).