Generic Linked List for Delphi 2009

前端 未结 4 1349
南笙
南笙 2021-01-19 09:16

I was looking in Generics.Collections and noticed there was no linked list. Sure they are simple to make, but I thought it was odd there was not one (or I just missed it).

4条回答
  •  遇见更好的自我
    2021-01-19 09:34

    In the old days, almost any piece of serious software contained linked lists or trees.

    I haven't used linked lists alot, but trees are another story.

    With the introduction of dynamic arrays, there is not that much need for linked lists. But I can imagine that you want to use it if your datastructure is changed often (add + delete).

    You can easily create a generic linked list yourself, using a container class and records for the elements.

提交回复
热议问题