Ask your own question, for FREE!
Mathematics 15 Online
OpenStudy (anonymous):

f(n){ if (n < 2) return 1 else return f(n – 1) + n

OpenStudy (anonymous):

What does the following algorithm return?

OpenStudy (dumbcow):

looks like a recursive function f(1) = 1 f(2) = f(1) +2 = 3 f(3) = f(2) +3 = 6 .... and so on

OpenStudy (anonymous):

so n!?

OpenStudy (dumbcow):

what do you need to solve for? the function will return various outputs given an integer n

OpenStudy (anonymous):

I want to know what does this algorithm return? f(n){ if (n < 2) return 1 else return f(n – 1) + n

OpenStudy (dumbcow):

for what n? the series will look like this: 1,3,6,10,15,21,28,36 ...

OpenStudy (anonymous):

Yes for n

OpenStudy (dumbcow):

for n. f(n) = f(n-1) +n im confused

OpenStudy (dumbcow):

sorry im no help, just not sure what you are asking for

OpenStudy (anonymous):

ok no problem

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!