Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    It does not really matter, because:

    • the array is passed by value, which means the whole array is still copied without a good reason,
    • even if you iterate only through half of the array, you still need to access its every element, which is not much difference from iterating over the whole array.