Solution to Min-Avg-Two-Slice by codility – Code Says