goal
It used array to store the cpu usage of process, and sorting then find the median.
Probably it can use heap to store the data and find median easier with good performance
references
- https://leetcode.com/problems/find-median-from-data-stream/discuss/329657/JavaScript-max-heap-%2B-min-heap