You are viewing a single comment's thread. Return to all comments →
what does
value = pushpop(self.upper, value) value = -pushpop(self.lower, -value)
do? I didn't understad why you negate value here.
Seems like cookies are disabled on this browser, please enable them to open this website
Heaps: Find the Running Median
You are viewing a single comment's thread. Return to all comments →
what does
do? I didn't understad why you negate value here.