Top 80+ Solved Searching, Sorting and Hashing Techniques MCQ Questions Answer

From 1 to 15 of 59

Q. Where is linear searching used?

a. When the list has only a few elements

b. When performing a single search in an unordered list

c. Used all the time

d. When the list has only a few elements and When performing a single search in an unordered list

  • d. When the list has only a few elements and When performing a single search in an unordered list

Q. What is the best case for linear search?

a. O(nlogn)

b. O(logn)

c. O(n)

d. O(1)

  • d. O(1)

Q. What is the worst case for linear search?

a. O(nlogn)

b. O(logn)

c. O(n)

d. O(1)

  • c. O(n)

Q. What is the best case and worst case complexity of ordered linear search?

a. O(nlogn), O(logn)

b. O(logn), O(nlogn)

c. O(n), O(1)

d. O(1), O(n)

  • d. O(1), O(n)

Q. Which of the following is a disadvantage of linear search?

a. Requires more space

b. Greater time complexities compared to other searching algorithms

c. Not easy to understand

d. Not easy to implement

  • b. Greater time complexities compared to other searching algorithms

Q. What is the advantage of recursive approach than an iterative approach?

a. Consumes less memory

b. Less code and easy to implement

c. Consumes more memory

d. More code has to be written

  • b. Less code and easy to implement

Q. What is the worst case complexity of binary search using recursion?

a. O(nlogn)

b. O(logn)

c. O(n)

d. O(n2)

  • b. O(logn)

Q. What is the average case time complexity of binary search using recursion?

a. O(nlogn)

b. O(logn)

c. O(n)

d. O(n2)

  • b. O(logn)

Q. Which of the following is not an application of binary search?

a. To find the lower/upper bound in an ordered sequence

b. Union of intervals

c. Debugging

d. To search in unordered list

  • d. To search in unordered list

Q. Binary Search can be categorized into which of the following?

a. Brute Force technique

b. Divide and conquer

c. Greedy algorithm

d. Dynamic programming

  • b. Divide and conquer

Q. What is the time complexity of binary search with iteration?

a. O(nlogn)

b. O(logn)

c. O(n)

d. O(n2)

  • b. O(logn)
Subscribe Now

Get All Updates & News