|
|
Re: Please help me with the following question
Posted:
Mar 7, 2013 3:04 PM
|
|
>if not then the heavier one is the heavier one.
lol^2
You don't know if the counterfeit is heavier or lighter. Your algorithm doesn't work, and you didn't stump me.
(But, per your observation, any divide and conquer strategy might be loosely called "binary search" if the division is always into two roughly equal halves. My clarifications were for other readers. The details of such a strategy could get tricky though, best to fill them in, and contemplate. [In this case, see, in fact, that it doesn't work.])
Cheers, Joe N
|
|