You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is essentially an optimization for the key expiration, as if we expire > 1 key at a time, we'll be left with > 1 nil block at a time. What I want to do is to treat a block of nil nodes as a single node and percolate the block down normally. I think this will reduce total time complexity from O(MlogN) to O(logN) where N is the number of total nodes in the binary heap and M is the number of nil nodes at the head of the list.
Percolate chunks of nil nodes down as if they're a single node
The text was updated successfully, but these errors were encountered:
This is essentially an optimization for the key expiration, as if we expire > 1 key at a time, we'll be left with > 1 nil block at a time. What I want to do is to treat a block of nil nodes as a single node and percolate the block down normally. I think this will reduce total time complexity from O(MlogN) to O(logN) where N is the number of total nodes in the binary heap and M is the number of nil nodes at the head of the list.
The text was updated successfully, but these errors were encountered: