subject

2. Explain how to use an array of pointers to refer to objects allocated elsewhere in C. What should and should not be allocated specifically for the pointer array? 3. Explain how to use an array of pointers to act as a flexible dynamically allocated array in C. What must be allocated for this kind of double-pointer array?

4. A simple sorting algorithm has quadratic (2) performance. It takes three minutes to sort a list of 1,000 entries. How long do you expect it to take to sort a list of 100,000 entries? How did you arrive at your answer?

5. A binary searching algorithm has logarithmic (log) performance. It takes a second to find an item in a list of 1,000,000 entries. How long do you expect it to take to find an item in a list of 100 entries? How did you arrive at your answer?

6. A naïve searching algorithm took three seconds to find an item in a list of 2,700 entries and eight seconds to find an item in a list of 7,200 entries. Estimate its runtime in terms of milliseconds per entry. How did you arrive at your answer?

7. An unknown searching algorithm took a second to find an item in a list of 250 entries, two seconds to find an item in a list of 2,500 entries, and four seconds to find an item in a list of 250,000 entries. Estimate its runtime in big- terms. How did you arrive at your answer?

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 14:00
Mr. johnson creates a game in which the players see the world from their avatar’s perspective. what genre of game is this?
Answers: 2
question
Computers and Technology, 22.06.2019 03:40
Mary's manager told her she should insert a graphic into her documentwrite mary a brief note describing how to insert a graphicin a word processing document.
Answers: 1
question
Computers and Technology, 22.06.2019 06:00
Which of the following is a way that advancements in technology improve humans' ability to measure air quality and protect human health? a. air quality data gathered by new instruments can be used to reduce exposure to pollutants. b. new technologies enable natural and human-made pollution sources to be located and monitored. c. air quality data gathered by new instruments can be used to predict trends in pollution over time. d. new technologies allow governments to make informed decisions about the regulation of pollution. (choose more than one)
Answers: 2
question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place?
Answers: 1
You know the right answer?
2. Explain how to use an array of pointers to refer to objects allocated elsewhere in C. What should...
Questions
question
Spanish, 11.11.2020 22:00
question
Mathematics, 11.11.2020 22:10
question
Mathematics, 11.11.2020 22:10
question
Mathematics, 11.11.2020 22:10
question
Mathematics, 11.11.2020 22:10
Questions on the website: 13722360