How to find median value for five given elements based on the max min and sum of the elements this question occurred in my interview,
How to find the median values using the min, max, and sum values of the given 5 elements?
for eg if given 3 elements we can use
sum - min - max
a = [3,6,9]
here median is 6
min = 3
max = 9
sum = 18
18 - 9- 3 = 6
which is the same as median values.
so the question is how to find the median for the 5 elements?
find for the a = [1,2,3,4,10]

Find the max and min of the initial list.
Create a new list without those 2 elements.
Find the new max, min and sum and use the method you mentioned,
median = sum - min - max
