Hacker News new | ask | show | jobs
by kazagistar 3348 days ago
Almost any insertion requires a scan.
2 comments

Well, given that the pointers are contained in the nodes themselves, if a piece of code is already looking at a node when deciding if an insertion is needed, then no additional scan is required.
Many do, but there are also insertions in unsorted lists or insertions after a given element...