public static void Run()
        {
            var medianTracker = new MedianTracker();
            var input         = Console.ReadLine();

            while (!string.IsNullOrEmpty(input))
            {
                medianTracker.Add(int.Parse(input));
                Console.WriteLine($"{medianTracker.Median:.0}");
                input = Console.ReadLine();
            }

            medianTracker.Unwind();
        }
示例#2
0
 static void Main(string[] args)
 {
     MedianTracker.Run();
 }