March 19, 2020
9:02 p.m.
On Thu, Mar 19, 2020 at 07:28:56PM +0100, Marco Sulla wrote:
On Mon, 16 Mar 2020 at 22:22, Andrew Barnert via Python-ideas <python-ideas@python.org> wrote:
I think the best solution is to just not have a SortedList. C++, Java, etc. don’t provide anything like that
Guava has TreeMultiset: https://guava.dev/releases/snapshot/api/docs/com/google/common/collect/TreeM...
The problem is: is there a use case? I mean, how much time you need to sort a list, add an element and re-sort it?
Depends on whether you are adding and re-sorting *one* element, or if you have to process a hundred million elements, re-sorting after each one. -- Steven