Design a data structure that supports adding numbers from a data stream and finding the median of all elements added so far.
Asked in the Phone Interview stage. The question was reported as being similar to LeetCode 295, Find Median from Data Stream.
Implement median_stream(operations). Each operation is ['add', number] or ['find']. Return a list containing the median for every find operation. The input guarantees that each find occurs after at least one number has been added. For an even count, return the average of the two middle values.
def median_stream(operations):