October 15, 2023
October 15, 2023
October 15, 2023
###### Digital-Logic-Design
October 15, 2023
 Question 31

Which of the following statements is true?

I. As the number of entries in a hash table increases, the number of collisions increases.
II. Recursive programs are efficient
III. The worst case complexity for Quicksort is O(n2)
 A I and II B II and III C I and IV D I and III
Question 31 Explanation:
Binary search using linked list is not efficient as it will not give O(log n), because we will not be able to find the mid in constant time. Finding mid in linked list takes O(n) time.
Recursive program requires stack for storing the function state. Any recursive program can be rewritten as an iterative one. Advantage of recursion is “less programming effort”, while it always lags behind iterative one in terms of performance.
Question 31 Explanation:
Binary search using linked list is not efficient as it will not give O(log n), because we will not be able to find the mid in constant time. Finding mid in linked list takes O(n) time.
Recursive program requires stack for storing the function state. Any recursive program can be rewritten as an iterative one. Advantage of recursion is “less programming effort”, while it always lags behind iterative one in terms of performance.