|
|
|
|
|
by dehrmann
2039 days ago
|
|
IIRC, bubble sort is only useful if you're sorting a doubly linked list in constant memory. Linked lists aren't that useful either. If you're iterating over the entire list and making changes in the middle, you're better off rebuilding the list as a vector because lower memory overhead makes two vectors smaller than one linked list. The most frequent correct uses of linked lists that I've seen are lock-free, concurrent data structures and hashtables that save insertion order. |
|