completed self.max, middle_element, sum_arrays