max-array: Maximum array revisited