For any evenly spaced set, the mean of the set is always equal to the median. A set of consecutive integers is an example of an evenly spaced set. If we find the mean of this set, we will be able to find the median because they are the same.
This applies only for consecutive integers sets not for sets which contain multiples. Test the nos to prove & grasp