in reply to Re: Binary search algorithm.
in thread Binary search algorithm.
:w is vi's save ("write") command. He must have tried to save while in edit mode.What is the meaning of :w in the code?
Why are you modifying $try? It always gets assigned from int(($lo + $hi)/2) at the top of the loop.
Yes, but $hi or $lo changes in every loop pass.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Binary search algorithm.
by jwkrahn (Abbot) on Aug 13, 2011 at 05:36 UTC | |
by ikegami (Patriarch) on Aug 13, 2011 at 05:54 UTC | |
by jwkrahn (Abbot) on Aug 13, 2011 at 06:17 UTC | |
by ikegami (Patriarch) on Aug 13, 2011 at 16:52 UTC | |
by jwkrahn (Abbot) on Aug 14, 2011 at 18:30 UTC | |
|