By which I mean a structure with:
- O(log n) complexity for
x.push()operations - O(log n) complexity to find an element
- O(n) complexity to compute
list(x)which will be sorted
I also had a related question about performance of list(...).insert(...) which is now here.