Daily Challenge (120 Part Series)
Imagine you have 8 coins of equal weight, except for one. The odd one weighs less than the others because it is not made of pure gold. How many iterations are needed to find this counterfeit coin using a two plate scale?
Write a function that represents this logic puzzle and returns the minimum number of weightings it will take to measure n coins, without relying on luck at all. It can help to think recursively.
Good luck, have fun!
Want to propose a challenge idea for a future post? Email email@example.com with your suggestions!
This series of posts document a high-level process to use when planning a modern web application, from project organization, collaboration considerations and tooling choices during development, all the way through deployment and performance strategies.