2336. Smallest Number in Infinite Set ¶
- Time:
- Constructor: $O(1)$
popSmallest()
: $O(\log n)$addBack(num: int)
: $O(1)$
- Space: $O(|\texttt{addBack()}|)$
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
popSmallest()
: $O(\log n)$addBack(num: int)
: $O(1)$1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|