needs to be minus 1

When you have an array of even length (e.g. 6), and you divide by 2,
you get 3. The element at index 3 is actually the 4th element. To get
the correct median, we need to average this value with the 3rd element,
i.e. element at index 2. So, we need to use -1, not +1.