You have 9 balls, equally big, equally heavy - except for one, which is a little heavier. How would you identify the heavier ball if you could use a pair of balance scales only twice?
DEMO: http://dev.ibelik.com/9balls/
Screenshot, scheme and dump located in the data
directory.
Install:
-
composer install
-
bower install
-
vendor/bin/phinx init
-
edit phinx.yml config
-
vendor/bin/phinx migrate
Test:
php vendor/phpunit/phpunit/phpunit tests/BallsTest