Why is DList insertion log n?
monkyyy
crazymonkyyy at gmail.com
Sun Feb 16 19:26:50 UTC 2025
On Sunday, 16 February 2025 at 18:46:56 UTC, Ian wrote:
> Hi,
>
> I'm looking at the double linked list in std.containers and it
> says that insertion in front or back are O(log n). How come
> they are not O(1) ?
>
> https://dlang.org/phobos/std_container_dlist.html#.DList.insertFront
>
> Also, is this question more for "General"? I'm a "new user" and
> "learning" so it made sense here, but I'm learning my way
> around the forum.
>
> Ian
No one actually uses any of them nor reads the code often; but Im
pretty sure aa is on team "once you define an api it must never
change" and probably over estimated to allow swapping to other
academia theatrical ideas or is considering some absurd edge case
More information about the Digitalmars-d-learn
mailing list