## Question 1 What should be the output if the following number stream is given as input? [12, 14, 36, 54] ### Options 1. 25.0 Correct Since there is an even number of elements in the data stream, the median is the average of the two middle elements. In this case, median $= \frac{14+36}{2} =$ 25.0 ---------------------------- 2. 29.0 Incorrect ---------------------------- 3. 36.0 Incorrect ---------------------------- 4. 14.0 Incorrect ---------------------------- --------------------------------------------- ## Question 2 What should be the output if the following number stream is given as input? [3, 2, 3, 4, 5, 6, 1] ### Options 1. 4.0 Incorrect ---------------------------- 2. 3.0 Correct There are 7 elements in the data stream. The median would be the fourth element in sorted order. In this case, median = 3.0. ---------------------------- 3. 4.5 Incorrect ---------------------------- 4. 3.5 Incorrect ---------------------------- --------------------------------------------- ## Question 3 What should be the output if the following number stream is given as input? [1, 1, 1, 1, 2, 3, 4, 2, 1, 2, 3] ### Options 1. 1.0 Incorrect ---------------------------- 2. 1.5 Incorrect ---------------------------- 3. 2.0 Correct There are 11 elements in the data stream. The median would be the sixth element in sorted order. In this case, median = 2.0. ---------------------------- 4. 1.9 Incorrect ---------------------------- ---------------------------------------------