32ms easy-to-understand java solution
class MedianFinder {\n    private Queue<Integer> maxHeap = new PriorityQueue(new Comparator<Integer>(){\n       @Override\n       public int compare(Integer i1,
    class MedianFinder {\n    private Queue<Integer> maxHeap = new PriorityQueue(new Comparator<Integer>(){\n       @Override\n       public int compare(Integer i1, Integer i2){\n           return Integer.compare(i2, i1);\n       }\n    });\n    private Queue<Integer> minHeap = new PriorityQueue(new Comparator<Integer>(){\n       @Override\n       public int compare(Integer i1, Integer i2){\n           return Integer.compare(i1, i2);\n       }\n    });\n    \n    // Adds a number into the data structure.\n    public void addNum(int num) {\n        minHeap.offer(num);\n        maxHeap.offer(minHeap.poll());\n        \n        //if(maxHeap.size() > minHeap.size())\n        if(maxHeap.size() - minHeap.size() == 1){\n            minHeap.offer(maxHeap.poll());\n        }\n    }\n\n    // Returns the median of current data stream\n    public double findMedian() {\n        return minHeap.size() > maxHeap.size()\n             ? (double)minHeap.peek()\n             : (minHeap.peek() + maxHeap.peek())/2.0;\n    }\n};
[]