Question

3) [16 points total] Consider the following algorithm int SillyCalc (int n) int i; int Num, answer; if (n <= 4) return n 10;

a) [5 points] Write a recurrence relation for the worst case performance. b) [10 points] Solve that recurrence relation using

0 0
Add a comment Improve this question Transcribed image text
Answer #1

iven Inat fnt SrllyCole Ctnt ) e. 0) andT(n/4) n-, step ne Cunene mee →Step by bach subsitutian melhodl) TCn) nth4 4) -1 4bt, inducllon foy Let hek, hen for + e) nloaun

Add a comment
Know the answer?
Add Answer to:
3) [16 points total] Consider the following algorithm int SillyCalc (int n) int i; int Num, answer; if (n <=...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT