SortedList
class SortedList[T]
Fields
1
T
type
Constructors
1
Properties
1
Methods
2
add(self, value: T)
Defined in
sortedlistAdd value to sorted list.
Runtime complexity: $O(\log(n))$ (approximate).
>>> sl = SortedList()
>>> sl.add(3)
>>> sl.add(1)
>>> sl.add(2)
>>> sl
SortedList([1, 2, 3])
Special methods
3