Question: Below is the psuedo code, I need it in Python, thanks. Given N coins that look identical and should be the same weights. However, one
Below is the psuedo code, I need it in Python, thanks.
Given N coins that look identical and should be the same weights. However, one is a fake coin, which is lighter than the others. Design a recursive algorithm in python to find the fake coin by dividing N coins in three groups and weight them.

INPUT integer n ifn= 1 then the coin is fake else separate the coins into piles of A = ceiling(n/3), B = ceiling(n/3), and C = n-2"ceiling(n/3) weigh A and B if the scale balances then iterate with C else iterate with the lighter of A and B
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
