ADA Algorithm MCQ Quiz (Multiple Choice Questions And Answers)
Are you preparing for the next job interviews? If yes, trust me this post will help you also we'll suggest you check out a big collection for Programming Full Forms that may help you in your interview:
List of Programming Full Forms
6. What is the worst case time complexity of insertion sort where position of the data to be inserted is calculated using binary search?
- N^2
- NlogN
- N(logN)^2
- N
- X will be a better choice for all inputs
- X will be a better choice for all inputs except possibly small inputs
- X will be a better choice for all inputs except possibly large inputs
- Y will be a better choice for small inputs
8. What is the time complexity of Floyd–Warshall algorithm to calculate all pair shortest path in a graph with n vertices?
- O(n^2logn)
- Theta(n^2logn)
- Theta(n^4)
- Theta(n^3)
9. The tightest lower bound on the number of comparisons, in the worst case, for comparison-based sorting is of the order of
- N^2
- NlogN
- N
- N(logN)^2
A list of n string, each of length n, is sorted into lexicographic order using the merge-sort algorithm.
- O (n log n)
- O(n^2 log n)
- O (n^2 + log n)
- O(n^2)