solution - Data Structures and Algorithms : Searching (Test 1)

Question : Which searching algorithm checks each element one by one until the target is found?

Solution :
506020260621043058 Correct Answer : Linear Search

Description -

Data Structures and Algorithms : Searching (Test 1)

Question : Binary Search works only when the array is:

Solution :
486620260621043013 Correct Answer : Sorted

Description -

Data Structures and Algorithms : Searching (Test 1)

Question : Worst-case time complexity of Linear Search is:

Solution :
719220260621042932 Correct Answer : O(n)

Description -

Data Structures and Algorithms : Searching (Test 1)

Question : Worst-case time complexity of Binary Search is:

Solution :
514820260621042845 Correct Answer : O(log n)

Description -

Data Structures and Algorithms : Searching (Test 1)

Question : Which searching algorithm is simpler to implement?

Solution :
313020260621042756 Correct Answer : Linear Search

Description -

Data Structures and Algorithms : Searching (Test 1)

Question : Binary Search repeatedly divides the search interval into:

Solution :
590720260621042720 Correct Answer : Two equal parts

Description -

Data Structures and Algorithms : Searching (Test 1)

Question : Which search algorithm can be used on an unsorted array?

Solution :
766620260621042623 Correct Answer : Linear Search

Description -

Data Structures and Algorithms : Searching (Test 1)

Question : Average time complexity of Linear Search is:

Solution :
821620260621042527 Correct Answer : O(n)

Description -

Data Structures and Algorithms : Searching (Test 1)

Question : Binary Search is based on which strategy?

Solution :
479820260621042435 Correct Answer : Divide and Conquer

Description -

Data Structures and Algorithms : Searching (Test 1)

Question : Which search algorithm performs better for large sorted datasets?

Solution :
332920260621042353 Correct Answer : Binary Search

Description -

Data Structures and Algorithms : Searching (Test 1)

Question : In Binary Search, the middle index is calculated as:

Solution :
939520260621042256 Correct Answer : (low + high) / 2

Description -

Data Structures and Algorithms : Searching (Test 1)

Question : Best-case time complexity of Linear Search is:

Solution :
218620260621042214 Correct Answer : O(1)

Description -

Data Structures and Algorithms : Searching (Test 1)

Question : Best-case time complexity of Binary Search is:

Solution :
332420260621042136 Correct Answer : O(1)

Description -

Data Structures and Algorithms : Searching (Test 1)

Question : Binary Search cannot be efficiently applied to:

Solution :
69520260621042052 Correct Answer : Unsorted Array

Description -

Data Structures and Algorithms : Searching (Test 1)

Question : Maximum number of comparisons required in Binary Search for 16 elements is:

Solution :
179820260621042015 Correct Answer : 5

Description -

Data Structures and Algorithms : Searching (Test 1)

Question : What is the worst-case number of comparisons in Linear Search for an array of size n?

Solution :
437420260621041933 Correct Answer : n

Description -

Data Structures and Algorithms : Searching (Test 1)

Question : Which data structure benefits the least from Binary Search?

Solution :
12020260621041846 Correct Answer : Linked List

Description -

Data Structures and Algorithms : Searching (Test 1)

Question : Binary Search reduces the search space by:

Solution :
515120260621041800 Correct Answer : 50%

Description -

Data Structures and Algorithms : Searching (Test 1)

Question : If Binary Search is applied to an unsorted array, the result is:

Solution :
896820260621041654 Correct Answer : Unpredictable

Description -

Data Structures and Algorithms : Searching (Test 1)

Question : Which statement is TRUE?

Solution :
485120260621041553 Correct Answer : Binary Search works only on sorted data.

Description -

Data Structures and Algorithms : Searching (Test 1)