menu
Qammunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
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
Ask a Question
Questions
Unanswered
Tags
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 & Tech
high-school
Brian Dupuis
asked
by
Brian Dupuis
7.9k
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
8.5k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
Related questions
asked
Jan 8, 2024
120k
views
Suppose we have an unsorted array A of n elements, and we want to know if the array contains any duplicate elements. Clearly outline an efficient method for solving this problem. By efficient, I mean your
Wayne Werner
asked
Jan 8, 2024
by
Wayne Werner
7.4k
points
Engineering
high-school
1
answer
0
votes
120k
views
asked
Sep 27, 2024
104k
views
this implementation approach supports an efficient, i.e., O(log2N), implementation of the map's contains and get operations:a. unsorted array.b. sorted array.c. ArrayList.d. linked list.e. sorted linked
Ksrb
asked
Sep 27, 2024
by
Ksrb
8.0k
points
Engineering
college
1
answer
0
votes
104k
views
asked
Jul 15, 2024
115k
views
what is the order (big o) of the operation that determines if an item is in a list in an unsorted, array-based implementation?
ADH
asked
Jul 15, 2024
by
ADH
8.3k
points
Computers & Tech
high-school
1
answer
1
vote
115k
views
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.4m
questions
12.2m
answers
Categories
All categories
Mathematics
(3.7m)
History
(955k)
English
(903k)
Biology
(716k)
Chemistry
(440k)
Physics
(405k)
Social Studies
(564k)
Advanced Placement
(27.5k)
SAT
(19.1k)
Geography
(146k)
Health
(283k)
Arts
(107k)
Business
(468k)
Computers & Tech
(195k)
French
(33.9k)
German
(4.9k)
Spanish
(174k)
Medicine
(125k)
Law
(53.4k)
Engineering
(74.2k)
Other Questions
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?
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search Qammunity.org