I have a sorted list L and I have a binary search for determining where in the list to insert an element such that the resulting list will still be in order.
However L.insert(index,object) needs O(N) time complexity.
Is there another data structure for L that will serve the same purpose, but allows for a faster insertion?
bisect.insort()bisect.insort(): "Keep in mind that the O(log n) search is dominated by the slow O(n) insertion step."