orcawave6223 orcawave6223
  • 09-10-2019
  • Computers and Technology
contestada

What is the worst case running time of a linear search?

O(1)

O(log10N)

O(log2N)

O(log2N)

O(N)

O(N log N)

O(N2)

O(N3)

O(Nk)

O(2N)

O(N!)

Respuesta :

joaobezerra joaobezerra
  • 13-10-2019

Answer:

The worst case running time of a linear search is O(N).

Explanation:

In a linear search, you will run the program looking at each array position until you find your desired information.

The best case scenario is when you find it at the first position.

The worst case scenario is when you find the value at the last array position. So, in a N-length array, the information is at position N. This means that the worst case running time of a linear search is O(N).

Answer Link
markturley115 markturley115
  • 11-11-2019

Answer:

o(n)

Explanation:

Answer Link

Otras preguntas

0.75=0.4p+100 what does p equal?
Explain why the Treaty of Versailles was so different from Wilson’s fourteen-point plan.
5+13/18=can y’all please help me this is hard
A(n) _______________ formats information in a series using numbers or letters. A. Unordered list c. Ordered list b. Bulleted list d. Lettered list
I'm having trouble in this one, Please help me
Describe a test to determine whether an object is charged or uncharged.
3 + (7 + 12) = 7 + (3 + 12) is what property
Water is 11% hydrogen and 89% oxygen by mass. How many grams of oxygen are in a 250 g glass of water?
Sort the numbers based on the number of significant figures they have. Drag each tile to the correct location. One Significant Figure Two Significant Figures Th
¿Qué hace Andrés cuando regresa a casa después de haber ido a la piscina?