Another cool mini-project: advance a range within n steps from its end

Sebastiaan Koppe via Digitalmars-d digitalmars-d at puremagic.com
Sat Dec 5 14:38:04 PST 2015


On Saturday, 5 December 2015 at 20:52:23 UTC, Andrei Alexandrescu 
wrote:
> On 12/05/2015 11:22 AM, Sebastiaan Koppe wrote:
>>
>> What about using a rangified circular buffer of the same size 
>> you want
>> the tail to be, and lazily fill it?
>
> That's O(n) space :o). -- Andrei

I know, but it makes half the range primitive calls. Ain't that 
worth something? Well, it depends I suppose.


More information about the Digitalmars-d mailing list