, , O (log N). O (1) , , . , , , . O (log N), O (log N), O.
, , " " /.
If you wish, you can reduce the cost of updating the median pointer during input / deletion to O (1) by using (twice) a threaded binary tree , but Insert / Delete will still be O (log N).
source
share