Talk:Binary search: Difference between revisions

→‎Binary search or Guessing game: it was (almost) correct (just added int casting)
(→‎Binary search or Guessing game: it was (almost) correct (just added int casting))
Line 9:
:Marked incorrect. Needs to search an array, not guess a number. --[[User:IanOsgood|IanOsgood]] 12:46, 3 November 2008 (UTC)
::I just made an attempt at fixing it (no PHP experience...used [[Retrieving an Element of an Array]] and copied a check from the Java example). I also added a check to see if the search is complete (start and end have passed each other). Double-check it for me. --[[User:Mwn3d|Mwn3d]] 16:21, 3 November 2008 (UTC)
::: It is correct, even though the variable names (guess, secret...) are a little bit confusing; but in this regard, the fact that the task talks about the guessing game is confusing too (not too much anyway, but the task could be the same also without citing the game as analogy). --[[User:ShinTakezou|ShinTakezou]] 11:32, 17 May 2009 (UTC)