Finding the Closest Element in a Sorted Array

A coding problem about finding the 'most central' element in an array, which can be elegantly simplified by applying some maths.