One of the terms containing “a” have to be a part of the median
Can anyone give a simple yet detailed explanation for this? I didn’t fully understand the reasons given in the video explanation, esp. on why one of the middle element has to be “5”.
You need to keep in mind that the numbers aren’t arranged in increasing order.
So depending on the value of ‘a’ you choose, the order will change, and hence, correspondingly the 5th and the 5th element will change too.
You don’t need to specifically choose numbers.
You can use the information, ‘a>2’ to logically guess the sequence of the numbers, in terms of ‘a’, that would satisfy median = 5.
Because, we already have one 5, our second number should also be 5, to get the median as 5.
This will give us the 4th and the 5th to be –> 5, 2a
Why did I choose 2a? Because ‘a’, ‘a+2’ will always be lesser than ‘2a’ (as a>2)
So these 2 numbers have to come before the 4th number.
Hence, now we can solve it like –> 2a = 5 –> a = 2.5