chynalee4109 chynalee4109
  • 21-04-2022
  • Computers and Technology
contestada

You are searching for an item in an array of 40,000 unsorted items. The item is located at the last position. How many comparisons do you need to do to find it

Respuesta :

KennyOliver
KennyOliver KennyOliver
  • 22-04-2022
It depends on what algorithm you’re using.
If you’re going item by item, you’ll be looking at O(n) or O(40000)
Give me a reply if you want to know more, such as if you did binary search what the Big O notation is
Answer Link

Otras preguntas

What animals eat cassava?
A bag of rice weighs 3.18 pounds. Find its mass in kilograms (1kg=2.2lb)
A town has accumulated 4in of snow and the snow depth is increasing by 6in every hour a nearby town has accumulated 8in and the depth is increasing by 2in every
How to solve 5.5x+32=57
For a freely falling object dropped from rest, what is the acceleration at the end of the fifth second of fall? The sixth second? At the end of any elapsed time
what types of climate receives the smallest amount of rainfall?
8x-y=16 Find the slope and y-intercept of the line with the given equation. Write a complete solution, showing all steps used in finding the slope and y-interc
What are the greatest common factors of 51 and 85
1/3 cup of flour is used to make 5 dinner rolls. How many cups of flour are needed to make 3 dozen roll?
Explain true or false if you collect organize and interpret your data properly you will always be able to draw a logical conclusion