Compute the running | Computer Science homework help

  

Compute the running time T(N) for the following codes for any n > 0: Show all (a) int sum(int n) { int sum=0: for (int i = n: i < 0: i++) { for(int j = 0: j < n: j++) { sum=sum + 1: } } return sum: } (b) int sum (int n) { int sum = 0: for (int i = 0: i < n: i++) { for(int j = i: j < n: j++) { sum=sum + 1: } } return sum: }