My Evil Hack of the Week [entries|reading|network|archive]
simont

[ userinfo | dreamwidth userinfo ]
[ archive | journal archive ]

Tue 2006-06-27 12:14
My Evil Hack of the Week
LinkReply
[personal profile] simontTue 2006-06-27 18:21
In fact, no, hang on, your method doesn't even work. I'm not just after an occurrence of the needle; I'm after the rightmost. So if there are two occurrences, one in the left half and one straddling the halfway point, then the condition in your "if" will not be fulfilled and we'll recurse blindly into the left half, completely missing the rightmost real occurrence in favour of the rightmost one that didn't hit a special case.
Link Reply to this | Parent
navigation
[ go | Previous Entry | Next Entry ]
[ add | to Memories ]