Wiley Interview Question

Calculate the sum of an array