Apple interview question

Find median from data stream