Solution didn't make sense


How was the median found?
I am unable to understand that.
My approach was counting to 100 by adding 3 and then adding 1 and 100 and dividing by 2 and then later multiplying it by number of items to get 100 but that is not the answer.
Fair enough but the solution is even more complex.

It’s just applying this where we now have 100 numbers instead of just 8.

Consequently, The median is the average of the 50th and 51st number.

so for 100 numbers it is always 50th and 51st number the median so how do we find for 200 numbers?

Here’s a trick which I’ll try to impart in the simplest way i can possibly think of.

If you want to find the position of the median of N numbers then add 1 and divide by 2.

N can be either even or odd. We’ll do both cases just for clarity’s sake.

  1. Let’s consider N = even, so something like N = 200.
    After adding 1 and dividing by 2 for n = 200, we have: 201/2 = 100.5. A position of 100.5 doesn’t make much sense because as you can tell positions should be counting numbers. In such a case, we consider that 100.5th position technically is just telling you to compute the average of the number immediately below and above it. In other words, we want to compute the average of the 100th and 101st term. The same process is essentially replicated for any even N.

  2. For N = odd, it’s pretty easy. If you consider N = 351 as an example then adding 1 and dividing by 2 for N should result in 352/2 = 176. This means the median occurs at the 176th term.