![cretinous](/avatars/34241.jpg)
cretinous
27.02.2020 •
Computers and Technology
Suppose you are choosing between the following three algorithms:
Algorithm A solves problems by dividing them into five sub-problems of half the size, recursively solving each sub-problem, and then combining the solutions in linear time.
Algorithm B solves problems of size n by recursively solving two sub-problems of size n=1 and then combining the solutions in constant time.
Algorithm C solves problems of size n by dividing them into nine sub-problems of size n=3, recursively solving each sub-problem, and then combining the solutions in O(n2) time.
What are the running times of each of these algorithms (in big-O notation), and which would you choose?
Solved
Show answers
More tips
- F Food and Cooking 10 Tips for Proper Sushi Consumption...
- S Style and Beauty Learn how to tie a keffiyeh on your head like a pro...
- S Style and Beauty How to Braid Hair with a Plaiting Machine: Tips and Recommendations...
- C Computers and Internet Where did torrents.ru move to?...
- H Health and Medicine How to Get Pregnant Faster?...
- A Animals and plants Money Tree Care Secrets: How to Keep Your Plant Thriving...
- S Sport How to Learn to Pull Up on Monkey Bars?...
- H Health and Medicine What was the Invention of Viagra?...
- L Leisure and Entertainment How to Properly Wind Fishing Line onto a Reel?...
- L Leisure and Entertainment How to Make a Crab Trap in Just a Few Minutes...
Answers on questions: Computers and Technology
- M Mathematics Help pls (40 points)...
- E English Compare the opinions of Konnikova and Nisbet toward the news media. Do they view journalists as generally responsible?...
- M Mathematics Evaluate 2000(0.085)3200(0.045)(8) fast!...
- E English Which term describes the function of reflective writing? a. to persuade others b. to describe an event c. to convey thoughts and feelings d. to discuss an idea...
Ответ:
The pseudocode is as follows:
1. Start
2. total = 0
3. for i = 100 to 180 step 5
3.1 total = total + i
4. print total
5. Stop
Explanation:
This begins the algorithm
1. Start
This initializes the total to 0
2. total = 0
This iterates from 100 to 180 with an increment of 5
3. for i = 100 to 180 step 5
This adds up all multiples of 5 within the above range
3.1 total = total + i
This prints the calculates total
4. print total
This ends the algorithm
5. Stop
See attachment for flowchart