
Recurrence relations
I have this question and not sure if i answer it properly
SumU(S,x,y)
if x=y
return S[x]
else
return S[x] + SumU(S,x+1,y)
i was asked to give the recurrence relation for the time taken to sum a length n set of values from S and give the recursive and base cases?
Im not sure if T(n) = n1
base case T(1) = 0
if you can explain how can i do this properly and easily cuz i don't understand the way done in the book?


Yes it is C! its about algorithm analysis


Recurrence relations are somewhat related to computer programming, but certainly do not constitute a C programming question in itself.
*moved to General Discussions*

ok so now i need an answer to my questions anyone?? I have gave an answer and want some help!!!

This website may help you.