We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Median Updates
Median Updates
Sort by
recency
|
187 Discussions
|
Please Login in order to post a comment
i got this one
https://ideone.com/YWjB9B
Simple solution
The multi-set solution is O(n) for add and O(n) for remove (thus no better than using a sorted linkedlist). This is a heap based solution that's O(log n) for add but still O(n) for remove.
3 cases are getting failed for this code due to time complexity, import java.io.; import java.util.;
public class Solution {