Given a double[] A containing N real numbers as input, the partial sums problem specifies the following API describing the basic operations that we need. add(int i, double y) Add the value y to the ith number. partialSum(int i) Return the sum of the first i numbers, A[0] through A[i - 1].