Consider this function:
Implement an alternative function, with the same name, return type and parameters, that computes the same, but as efficiently as possible.
Precondition
Assume that A and B have the same number n of elements, that n is between 1 and 105, and that the elements of the vectors are all between 1 and 108.
Observation You only need to submit the required procedure; your main program will be ignored.