Data Structures MCQs (Part-8)

Which of the following searching algorithms has the best average time complexity?

A Jump Search
B Binary Search
C Interpolation Search
D Linear Search

What is the main advantage of using dynamic programming (DP)?

A Reduced space complexity
B Reduced time complexity by storing results
C Solves problems in linear time
D Easier to implement

Which of the following is a feature of recursion in data structures?

A Always reduces the problem size
B Must use dynamic memory allocation
C Always uses loops for iteration
D Requires an explicit stack

Which of the following is true about a binary search tree (BST)?

A All nodes have two children
B The left subtree has values greater than the node
C The right subtree has values smaller than the node
D It is balanced

Which searching algorithm is best used when the dataset is small or unsorted?

A Binary Search
B Jump Search
C Linear Search
D Exponential Search

In the context of dynamic programming, what is memoization?

A Storing previous function calls to avoid recalculation
B Using iterative methods instead of recursion
C Dividing the problem into equal subproblems
D Reducing time complexity by sorting

Which of the following is not typically used in dynamic programming?

A Optimal substructure
B Overlapping subproblems
C Divide and conquer
D Recursion with base case

Which of the following is a common use of recursion in data structures?

A Implementing dynamic programming
B Traversing trees
C Sorting arrays
D Searching in linked lists

Which searching algorithm can be used on a rotated sorted array?

A Linear Search
B Binary Search
C Jump Search
D Exponential Search

What is the key characteristic of a divide-and-conquer approach in algorithms?

A Subproblems are solved independently
B Solutions to subproblems are combined
C All problems are solved in parallel
D The problem is solved recursively without breaking it down

What is the main disadvantage of using recursion in algorithms?

A Increased space complexity due to the call stack
B Increased time complexity
C Limited to sorting problems only
D Recursion cannot be implemented iteratively

Which of the following algorithms works by breaking a problem down into smaller subproblems and solving them independently?

A Greedy Algorithm
B Dynamic Programming
C Divide and Conquer
D Backtracking

What is the time complexity of a binary search algorithm on a sorted array?

A O(n)
B O(log n)
C O(n log n)
D O(1)

Which of the following is not a characteristic of dynamic programming?

A Optimal substructure
B Overlapping subproblems
C Greedy choices
D Storing results of subproblems

Which data structure is most commonly used in implementing recursion?

A Queue
B Stack
C Hash Table
D Binary Tree