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
7.3k
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
7.9k
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.
8.5m
questions
11.2m
answers
Other Questions
“What does it mean when we “rework” copyrighted material?”
The book shows how to add and subtract binary and decimal numbers. However, other numbering systems are also very popular when dealing with computers. The octal (base 8) numbering system is one of these.
Seven basic internal components found in a computer tower
describe an advance in technology that makes life more enjoyable. what discoveries contribute to this technology?
Disadvantages of using animation in advertising? advantages and disadvantages of using animation for education? advantages and disadvantages of using animation in entertainment?
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search QAmmunity.org