Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE DO NOT COPY PASTE FROM CHEGG/OTHERWISE I'LL REPORT YOU Q1.1 4 Points In what situation we CAN use sequential search? (chose all that apply)

PLEASE DO NOT COPY PASTE FROM CHEGG/OTHERWISE I'LL REPORT YOU

image text in transcribed

Q1.1 4 Points In what situation we CAN use sequential search? (chose all that apply) when the array is sorted and the target is in the array, when the array is sorted and the target is not in the array. when the array is not sorted and the target is in the array. when the array is not sorted and the target is not in the array Q1.22 Points What is the big o of sequential search? (n is the length of the array) 0(1) Odlog n) O(n) On log n) O(n2) O(!n) Q1.3 5 Points Using the array 11, 30, 34, 90, 99 as the input for sequential search, how many array elements are accessed in order to find the target element 34? 1 element 2 elements 3 elements 4 elements 5 elements sequential search does not work here In what situation we CAN use binary search? (chose all that apply) when the array is sorted and the target is in the array when the array is sorted and the target is not in the array when the array is not sorted and the target is in the array when the array is not sorted and the target is not in the array What is the big o of binary search? (n is the length of the array) O 0(1) O Odlog n) O O(n) O Odlog n) O O(n2) O (In) Which of the following statements about binary search is NOT true? O it is the fastest searching algorithm we have learned in CS111 O it does not work if the target is not in the array o it does need extra array space for it to run the best case scenario is when the target is in the middle of the array

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

0619064625, 978-0619064624

More Books

Students also viewed these Databases questions

Question

2. How were various roles filled?

Answered: 1 week ago