Explanation: both recursion and iteration can be used to find the sum of digits of a number.
Design and Analysis of Algorithms MCQs | Page - 2
Dear candidates you will find MCQ questions of Design and Analysis of Algorithms here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Explanation: the sum of digits will be maximum when all the digits are 9. thus, the sum will be maximum for the number 9999, which is 36.
Explanation: the sum of digits will be minimum for the number 1000 and the sum is 1.
Explanation: the main purpose of the above code is to check if a string is a palindrome.
Explanation: 100 = 64 + 32 + 4 = 26 + 25 +
Explanation: the time complexity of the above recursive implementation used to
Explanation: the time complexity of recursive multiplication of two square matrices by the divide and conquer method is found to be o(n3) since there are total of 8 recursive calls.
Explanation: for the multiplication two square matrix recursively using strassen’s method, there are 7 recursive calls performed for high time complexity.
Explanation: the resultant matrix will be of order 3*5 when multiplied recursively and therefore the matrix will have 3*5=15 elements.
Explanation: given that b=c, so the two matrix can be recursively multiplied.
Jump to