4 ms·
O(log n) vs O(1)
by andromeduck 3y ago
O(log n) vs O(1)
- ryanschaefer 3y agoIs there a way to keep a list with changing values sorted in real time in order to use a log n search algorithm?
- andromeduck 3y agoIt's log n either way.
- throw_pm23 3y agoYes, a binary search tree that is dynamically balanced, for example red-black or avl.