News for hackers. Stuff that matters.
Re:Things I Wish I’d Learned Sooner After Being a Developer ... by dehrmann on Saturday November 21, 2020 @01:16PM (#25171504)
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.

There are no comments on this comment yet.