Top 350+ Solved Data Structures (DS) MCQ Questions Answer

From 331 to 345 of 370

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)

Q. What is an external sorting algorithm?

a. Algorithm that uses tape or disk during the sort

b. Algorithm that uses main memory during the sort

c. Algorithm that involves swapping

d. Algorithm that are considered ‘in place’

  • a. Algorithm that uses tape or disk during the sort

Q. What is an internal sorting algorithm?

a. Algorithm that uses tape or disk during the sort

b. Algorithm that uses main memory during the sort

c. Algorithm that involves swapping

d. Algorithm that are considered ‘in place’

  • b. Algorithm that uses main memory during the sort

Q. What is the worst case complexity of bubble sort?

a. O(nlogn)

b. O(logn)

c. O(n)

d. O(n2)

  • d. O(n2)

Q. What is the average case complexity of bubble sort?

a. O(nlogn)

b. O(logn)

c. O(n)

d. O(n2)

  • d. O(n2)

Q. Which of the following is not an advantage of optimised bubble sort over other sorting techniquesin case of sorted elements?

a. It is faster

b. Consumes less memory

c. Detects whether the input is already sorted

d. Consumes less time

  • c. Detects whether the input is already sorted
Subscribe Now

Get All Updates & News