Talk:Sorting algorithms/Strand sort: Difference between revisions
Content added Content deleted
m (→D Entry: a bit more explanation) |
m (→D Entry) |
||
Line 15: | Line 15: | ||
} |
} |
||
}</lang>[[User:Bearophile|bearophile]] |
}</lang>[[User:Bearophile|bearophile]] |
||
::: Well, I'll give it my best try. In my opinion the problem lies with the removeFront / removeBack functions. They don't set the _first._prev / _last._next pointers to null. This affects the |
::: Well, I'll give it my best try. In my opinion the problem lies with the removeFront / removeBack functions. They don't set the _first._prev / _last._next pointers to null. This affects the (linear)Remove because it relies on "before" and "after" checks. The following (adjusted) code seems to work. What do you think? <lang d> void removeFront() |
||
{ |
{ |
||
enforce(_first); |
enforce(_first); |