@@ -0,0 +1,1129 @@
+/**%0A * Problem Link: https://leetcode.com/problems/find-median-from-data-stream/%0A */%0Aclass MedianFinder %7B%0A    private List%3CInteger%3E sortedArray = new ArrayList%3CInteger%3E();%0A%0A    // Adds a number into the data structure.%0A    public void addNum(int num) %7B%0A        int left = 0;%0A        int right = sortedArray.size();%0A        while(left %3C right) %7B%0A            int mid = (left + right) / 2;%0A            if(sortedArray.get(mid) %3C= num) left = mid + 1;%0A            else right = mid;%0A        %7D%0A        // if(sortedArray.get(left) %3E num) sortedArray.add(0, num);%0A        // else %0A        sortedArray.add(left, num);%0A    %7D%0A%0A    // Returns the median of current data stream%0A    public double findMedian() %7B%0A        if(sortedArray.size() == 0) return 0.0;%0A        int mid = sortedArray.size() / 2;%0A        if(sortedArray.size() %25 2 == 1) %7B%0A            return sortedArray.get(mid);%0A        %7D else %7B%0A            return .5 * (sortedArray.get(mid) + sortedArray.get(mid - 1));%0A        %7D%0A    %7D%0A%7D;%0A%0A// Your MedianFinder object will be instantiated and called as such:%0A// MedianFinder mf = new MedianFinder();%0A// mf.addNum(1);%0A// mf.findMedian();%0A

Create Find_Median_from_Data_Stream.java