Follow up solutions! along with easy solution to problem.
\nMain solution link - [ https://leetcode.com/problems/find-median-from-data-stream/discuss/2043083/easy-and-simple-solution )\n\n1. If all integer numbers from
\nMain solution link - [ https://leetcode.com/problems/find-median-from-data-stream/discuss/2043083/easy-and-simple-solution )\n\n**1. If all integer numbers from the stream are between 0 and 100, how would you optimize it?**\n\nWe can maintain an integer array of length 100 to store the count of each number along with a total count. Then, we can iterate over the array to find the middle value to get our median.\n\nTime and space complexity would be O(100) = O(1).\n2. **If 99% of all integer numbers from the stream are between 0 and 100, how would you optimize it?**\n\nAs 99% is between 0-100. So can keep a counter for less_than_hundred and greater_than_hundred.\nAs we know soluiton will be definately in 0-100 we don\'t need to know those number which are >100 or <0, only count of them will be enough.\n
['C']