This question evaluates a candidate's competency in designing efficient data structures and algorithmic reasoning for dynamic order-statistics and streaming data within the Coding & Algorithms domain, emphasizing APIs, internal invariants, and rigorous time/space complexity analysis.
Design a data structure for a number stream that supports: add(num: int) in O(log n) time and median() -> float in O(