Question

Suppose you have the following list of integers: 3, 45, 72, 16, 9, 873, 1001, 2010,...

Suppose you have the following list of integers:

3, 45, 72, 16, 9, 873, 1001, 2010, 92

Which of the following search algorithms guarantee you will be able to determine whether the integer 16 is in the list?

a.

sequential search

b.

interpolation search

c.

iterative binary search

d.

recursive binary search

What is the worst case running time for removing an arbitrary item from a singly linked list?

O(N)

O(log N)

O(1)

O(N log N)

Which of the following are examples where you would not want to ignore a constant term or a coefficient in a Big-Oh analysis?

a.

When the constant term or coefficient is much larger than a particular value of N.

b.

When the constant term or coefficient is less than a particular value of N.

c.

When you are interested in determining a precise Big-Oh value for an algorithm.

d.

When you are interested in determining an order of magnitude Big-Oh value for an algorithm.

e.

a & c

f.

b & c

g.

Constant terms and coefficients are always ignored, regardless of the circumstances.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please do understand my concern, as per Chegg guidelines we are supposed to answer the first question if there is more than one question in a post, your downvote effects my career a lot, if I get a downvote for a wrong answer or incomplete answer I will accept it. Please give a positive rating

1)

a binary search is performed on arrays which are sorted, since the given list of elements are not sorted, the binary search doesn't work. either it is iterative or recursive.

Interpolation search is improved version of binary search and works on sorted elements so option b is wrong

the answer is option a

sequential search always searches elements one by one from the beginning, so after traversing through the entire list it is always guaranteed to give an answer whether 16 is present or not

Add a comment
Know the answer?
Add Answer to:
Suppose you have the following list of integers: 3, 45, 72, 16, 9, 873, 1001, 2010,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT