OT: c++ q
Shachar Shemesh
shachar at shemesh.biz
Sun Apr 26 19:15:23 IDT 2009
Diego Iastrubni wrote:
> On Sunday 26 April 2009 17:31:59 Shachar Shemesh wrote:
>
>>> Go back to school, and as punishment re-implement quick_sort in VB.NET.
>>>
>> Now that's going the "cruel and unusual" route.
>>
>> I do think every programmer should take the time to implement binary
>> search and quick sort at least once from scratch. The number of corner
>> cases there is outstanding, and it is a great practice of thinking of
>> the fine details.
>>
>
> Beeing a little serious:
> I am not sure quick_sort is a must, as quite frankly it's a reall mess and I
> don't understand it.
Sounds like an excellent reason to go there.
> But heap sort and binary sort, yes. Those are a must.
>
Heap sort is fairly straight forward once you have the heap. I do
believe every programmer should know how to write a heap (preferably, a
compressed one, where you keep no node pointers).
Shachar
--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20090426/4f20dbfa/attachment.html>
More information about the Linux-il
mailing list