tag:blogger.com,1999:blog-11149365.post5165107768867301274..comments2024-03-23T04:34:59.089+00:00Comments on Go deh!: More on binary searchPaddy3118http://www.blogger.com/profile/06899509753521482267noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-11149365.post-67051668354511414742010-04-28T20:37:34.734+01:002010-04-28T20:37:34.734+01:00Re the indentation error -- perhaps it's that ...Re the indentation error -- perhaps it's that there are some literal tab characters in the file? (I just checked -- presumably they came out of the comments I originally pasted from, because my Emacs is set up to insert spaces, not tabs.)<br /><br />I'm having trouble posting these comments: it's intermittently complaining "Your OpenID credentials could not be verified."Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-11149365.post-10018456800752996042010-04-28T20:32:30.770+01:002010-04-28T20:32:30.770+01:00Great. I have to admit I'm not sure all the fu...Great. I have to admit I'm not sure all the functions that pass the tests are correct (in the sense of being able to read it and understand why it's correct, with confidence) -- but the tests are better than me at finding actual problems.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-11149365.post-39215329132621384822010-04-26T04:06:43.937+01:002010-04-26T04:06:43.937+01:00Hi darius,
I first looked for a download button on...Hi darius,<br />I first looked for a download button on github, and on not finding one, I did find the button that gave a non-colourized view of the source so cut-n-pasted that to form my first version of your source. I then found that the indentation of several functions within functions was incorrect. (It was weird - just a few functions within functions). <br /><br />I can now see that I had not recreated the full guilherme_melo as it should be, and a restest shows that guilherme_melo IS INDEED CORRECT!<br /><br />Your testing and mine does now agree!<br /><br />- Paddy.Paddy3118https://www.blogger.com/profile/06899509753521482267noreply@blogger.comtag:blogger.com,1999:blog-11149365.post-84644711010093321532010-04-26T02:25:17.300+01:002010-04-26T02:25:17.300+01:00Cool!
I'm confused reading this test code, th...Cool!<br /><br />I'm confused reading this test code, though: it appears to say that guilherme_melo fails because calling it with [] and -0.5 does not return -1. But when call guilherme_melo([], -0.5) by hand, it does return -1 for me. Can you clear that up?Anonymousnoreply@blogger.com