Question

a. Write a pseudocode for computing for any positive integer n Besides assignment and comparison, your algorithm may only use the four basic arithmetical operations. What is the time efficiency of your algorithm for the worst and best cases? Justify your answer. (The basic operation must be identified explicitly). Give one instance for the worst case and one instance for the best case respectively if there is any difference between the worst case and best case. Otherwise please indicate that there is no difference between the worst case and best case. b. c. Requirements and hints: 1) Name the function as myFloorSqrt 2) The pseudocode must carefully define the functions input, output, and purpose 3) If n 7, the function must return 2. 4) If n = 9, the function must return 3.

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

Page: Date:

Add a comment
Know the answer?
Add Answer to:
a. Write a pseudocode for computing for any positive integer n Besides assignment and comparison, your...
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