Talk:Sailors, coconuts and a monkey problem

From Rosetta Code
Revision as of 22:12, 3 May 2015 by Rdm (talk | contribs) (→‎J)

J

I smiled at that end comment, but there may be an issue with the choice of an end value to search over. It seems that unlike testing incrementing values you have to put a ceiling on the range searched for.

But then you would have to do that in many solutions such as choosing an integer type in C or a range to search over in constraint solvers so just ignore me.
--Paddy3118 (talk) 08:35, 3 May 2015 (UTC)

I do have to put in a ceiling - that gives me bound search time and protects me from "infinite loop" bugs while I'm playing with the code. But if a given value doesn't give me good results, it's trivial for me to multiply it by 10 and try again. I guess what I'm saying is that for this problem, this approach saved time for me. (But I guess you basically said this already, in your second paragraph.) --Rdm (talk) 11:55, 3 May 2015 (UTC)