mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-05-02 06:46:18 -04:00
Change the dir structure slightly
This commit is contained in:
parent
6b6fe21db3
commit
2f4a9638c0
184 changed files with 0 additions and 21 deletions
9
source_code/builtin_structures/balance.txt
Executable file
9
source_code/builtin_structures/balance.txt
Executable file
|
@ -0,0 +1,9 @@
|
|||
__author__ = "bt3"
|
||||
|
||||
|
||||
This is the classic "you have 8 balls/coins, which are the same weight, except for one which is slightly heavier than the others. You also have an old-style balance. What is the fewest number of weighings to find the heavy coin/ball?
|
||||
|
||||
Answer: 2! You need to use every information available:
|
||||
Weight 3 x 3 balls/coins.
|
||||
If they weight the same: weight the 2 balls/coins left outside.
|
||||
Else, measure 2 of the 3 heavier balls/coins.
|
Loading…
Add table
Add a link
Reference in a new issue