This topic contains a solution. Click here to go to the answer

Author Question: What kind of performance can you expect if you perform linear search on a sorted array? (Read 739 times)

soccerdreamer_17

  • Hero Member
  • *****
  • Posts: 552

Question 1

What is the efficiency of binary search?
◦ n2 
◦ n
◦ log2 n
◦ n/2
◦ none of these

Question 2

What kind of performance can you expect if you perform linear search on a sorted array?
◦ The performance will be about the same as on an unsorted array
◦ The performance will be much better than on an unsorted array
◦ The performance will be much worse than on an unsorted array
◦ The performance will be worse than n2 in this case
◦ none of these


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by soccerdreamer_17 on Aug 30, 2020

kaylee05

  • Sr. Member
  • ****
  • Posts: 318
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 39% of students answer this correctly




 

Did you know?

Prostaglandins were first isolated from human semen in Sweden in the 1930s. They were so named because the researcher thought that they came from the prostate gland. In fact, prostaglandins exist and are synthesized in almost every cell of the body.

Did you know?

Interferon was scarce and expensive until 1980, when the interferon gene was inserted into bacteria using recombinant DNA technology, allowing for mass cultivation and purification from bacterial cultures.

Did you know?

Each year in the United States, there are approximately six million pregnancies. This means that at any one time, about 4% of women in the United States are pregnant.

Did you know?

In 1835 it was discovered that a disease of silkworms known as muscardine could be transferred from one silkworm to another, and was caused by a fungus.

Did you know?

Every 10 seconds, a person in the United States goes to the emergency room complaining of head pain. About 1.2 million visits are for acute migraine attacks.

For a complete list of videos, visit our video library