Linear Search Recursive Multiple choice Questions and Answers (MCQs)

DOWNLOAD FREE PDF <<CLICK HERE>>

Linear Search Recursive Multiple choice Questions and Answers (MCQs)

Congratulations - you have completed Linear Search Recursive Multiple choice Questions and Answers (MCQs).

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

Your performance has been rated as %%RATING%%


Your answers are highlighted below.
Question 1 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
Is there any difference in the speed of execution between linear serach(recursive) vs linear search(lterative)?
A
Both execute at same speed
B
Linear search(recursive) is faster
C
Linear search(Iterative) is faster
D
Cant be said
Question 1 Explanation: 
The Iterative algorithm is faster than the latter as recursive algorithm has overheads like calling function and registering stacks repeatedly.

Question 2 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
Is the space consumed by the linear search(recursive) and linear search(iterative) same?
A
No, recursive algorithm consumes more space
B
No, recursive algorithm consumes less space
C
Yes
D
Nothing can be said
Question 2 Explanation: 
The recursive algorithm consumes more space as it involves the usage the stack space(calls the function numerous times).

Question 3 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
What is the worst case runtime of linear search(recursive) algorithm?
A
O(n)
B
O(logn)
C
O(n2)
D
O(nx)
Question 3 Explanation: 
In the worst case scenario, there might be a need of calling the stack n times. Therfore O(n).

Question 4 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
Linear search(recursive) algorithm used in .....
A
When the size of the dataset is low
B
When the size of the dataset is large
C
When the dataset is unordered
D
Never used
Question 4 Explanation: 
It is used when the size of the dataset is low as its runtime is O(n) which is more when compared to the binary search O(logn).

Question 5 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
The array is as follows: 1, 2, 3, 6, 8, 10. At what time the element 6 is found? (By using linear search(recursive) algorithm)
A
4th call
B
3rd call
C
6th call
D
5th call
Question 5 Explanation: 
Provided that the search starts from the first element, the function calls itself till the element is found. In this case, the element is found in 4th call.

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

DOWNLOAD FREE PDF <<CLICK HERE>>