Median of Data Stream
Given a stream of numbers, find the median number at any given time (accurate to 1 decimal place).
Example:
add_number(1)
add_number(2)
add_number(3)
get_median() == 2.0
add_number(4)
get_median() == 2.5
You are on levelĀ Student
Given a stream of numbers, find the median number at any given time (accurate to 1 decimal place).
Example:
add_number(1)
add_number(2)
add_number(3)
get_median() == 2.0
add_number(4)
get_median() == 2.5
Monster Assistant is thinking...