Data Structure Questions and Answers-Binary Search Iterative

DOWNLOAD FREE PDF <<CLICK HERE>>

Data Structure Questions and Answers-Binary Search Iterative

Congratulations - you have completed Data Structure Questions and Answers-Binary Search Iterative.

You scored %%SCORE%% out of %%TOTAL%%.

Your performance has been rated as %%RATING%%


Your answers are highlighted below.
Question 11 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
Given an array arr = {45, 77, 89, 90, 94, 99, 100} and key = 100; What are the mid values(corresponding array elements) generated in the first and second iterations?
A
90 and 99
B
90 and 100
C
89 and 94
D
94 and 99
Question 11 Explanation: 
Trace the input with the binary search iterative code.

Question 12 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
What is the time complexity of binary search with iteration?
A
O(nlogn)
B
O(logn)
C
O(n)
D
O(n2)
Question 12 Explanation: 
T(n) = T(n/2) + theta(1)

Using the divide and conquer master theorem, we get the time complexity as O(logn).

Once you are finished, click the button below. Any items you have not completed will be marked incorrect. Get Results
There are 12 questions to complete.

DOWNLOAD FREE PDF <<CLICK HERE>>