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 22:00
Matlab question: use switch and anythe lottery game matches three different integer numbers between 1 and 10. winning depends on how many matching numbers are provided by a player. the player provides three different integers between 1 and 10.if there is a match of all 3 numbers, the winning $ 1000.if there is a match with 2 numbers, the winning $ 10.if there is a match of all with 1 numbers, the winning $ 1.with no match, the winning is $0.write a function lottery3 that checks three numbers provided by a player and determine the winning amount. if the user mistakenly enters same number twice/thrice and if that number matches one of the winning numbers, the code should count that number only once and display correct result. the player doesn’t have to guess the order of numbers.the input to the function lottery3 can have up to two input arguments. the first input argument is a row array numbers with 3 numbers. if the second argument input testcode is present, and is a row vector of 3 values, the function lottery3 uses the code in testcode as the three winning numbers (the test must be three different integer numbers between 1 and 10), else three different numbers will be automatically generated by testcode.the ouput should return the variable winnings and the three winning numbers in the row array winnumbers.hint: make use of the internal function any.restriction: the function must use switch-case statements to determine the winning.example #1: winning = lottery3( [1,2,1],[1,2,3])produceswinning =10example #2: [winning,winnumbers] = lottery3( [1,2,3])produceswinning =3winnumbers =8 5 3
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
Type the correct answer in the box. spell all words correctly. under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 3
question
Computers and Technology, 22.06.2019 18:30
All of the following are characteristics that must be contained in any knowledge representation scheme except
Answers: 3
question
Computers and Technology, 22.06.2019 23:30
Which of the following is not a symptom of chronic fatigue syndrome
Answers: 2
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
Mathematics, 23.11.2019 22:31
question
Mathematics, 23.11.2019 22:31
question
English, 23.11.2019 22:31
Questions on the website: 13722363