(10%) Consider the following algorithm:
for (i = 1; i <= 2n; i++) sum = sum + i; for (i = n; i >= 1; i--) sum = sum + i; cout << sum;
(1) (5%) What is the output when n=4n = 4n=4?
(2) (5%) What is the time complexity T(n)T(n)T(n)?