Realised there is a problem with the array pair sum when the array is a different order.