InterviewSolution
Saved Bookmarks
| 1. |
By what factor time complexity is reduced when we apply square root decomposition to a code?(a) n(b) √n(c) n^2(d) n^-1/2This question was addressed to me during an online exam.Origin of the question is Miscellaneous topic in chapter Miscellaneous of Data Structures & Algorithms II |
|
Answer» CORRECT answer is (b) √n The best EXPLANATION: In square root DECOMPOSITION a given array is DECOMPOSED into SMALL parts each of size √n. This reduces the time complexity of the code by a factor of √n. |
|