menu
QAmmunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
Register
Ask a Question
Questions
Unanswered
Tags
Categories
Ask a Question
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
asked
Jul 27, 2023
111k
views
4
votes
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
Computers and Technology
high-school
Brian Dupuis
asked
by
Brian Dupuis
3.4k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
6
votes
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
Egoskeptical
answered
Aug 3, 2023
by
Egoskeptical
3.7k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
3.6m
questions
4.6m
answers
Other Questions
Assume you have created a mechanical arm that can hold a pen. The arm can perform the following tasks: • Lower the pen to a piece of paper. • Raise the pen from the paper. • Move the pen 1 inch along a
What problem does chlorofluorocarbon (CFC) create? a. it causes lead poisoning b.it causes great damage to the ozone layer c. it leaks into food as it cools the air and refrigerators d. it is responsible
What do customers typically notice during virtual interactions?
Bob is stationed as a spy in Cyberia for a week and wants to prove that he is alive every day of this week and has not been captured. He has chosen a secret random number, x, which he memorized and told
To use the mail merge feature in Access, the first step is to start the Microsoft Word Mail Merge Wizard. a. True b. False
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search QAmmunity.org