Efficient binary search using two-way comparisons

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Mon Nov 30 08:49:04 PST 2015


On 11/29/2015 04:13 PM, Enamex wrote:
> On Saturday, 28 November 2015 at 20:04:11 UTC, Andrei Alexandrescu wrote:
>> While reading Okasaki's bool on persistent data structures, I found
>> (page 14) a reference to a nice idea applicable to binary search using
>> D's two-way "less than" comparisons.
>>
>> https://issues.dlang.org/show_bug.cgi?id=15385
>>
>> Any takers?
>>
>>
>> Andrei
>
> Looks really simple. I could try? Though I'll probably come asking here
> about contribution procedures and stuff (especially that I can't, not
> possibly, compile Phobos or anything close to it with tests and such).

Xinok got ahead, but don't let that deter you. I'll post here other 
similar simple yet interesting tasks, and I encourage others to do the 
same. -- Andrei


More information about the Digitalmars-d mailing list