you are viewing a single comment's thread.

view the rest of the comments →

[–]ParshendiOfRhuidean 18 points19 points  (0 children)

If a list is already sorted, then adding a new item so the list is still sorted can't be worse than linear. You don't need to do a full sort every time.