|
|
|
|
|
by jstimpfle
3348 days ago
|
|
Don't forget that there are valid uses of linked lists even in 2017. If there are more insertions / removals than scans, an array makes no sense. Reallocating a big dynamic array is also a no-go in many time-constrained situations. > You actually have to allocate the memory for the node, too. The way this is done is by intrusive linking (the data must include list pointers). The data usually knows in which lists it is linked, so there is no point in having a version of the data without a list head. |
|