Find Median from Data Stream (LeetCode 295)The problem Design a class with two methods: adds a number from the stream…