On This Page
This set of Design and Analysis of Algorithms Multiple Choice Questions & Answers (MCQs) focuses on Design And Analysis Of Algorithms Set 1
Q1 | Recursion is similar to which of the following?
- switch case
- loop
- if-else
- if elif else
Q2 | Recursion is a method in which the solution of a problem depends on
- larger instances of different problems
- larger instances of the same problem
- smaller instances of the same problem
- smaller instances of different problems
Q3 | Which of the following problems can’t be solved using recursion?
- factorial of a number
- nth fibonacci number
- length of a string
- problems without base case
Q4 | In general, which of the following methods isn’t used to find the factorial of a number?
- recursion
- iteration
Q5 | Which of the following recursive formula can be used to find the factorial of a number?
- fact(n) = n * fact(n)
- fact(n) = n * fact(n+1)
- fact(n) = n * fact(n-1)
- fact(n) = n * fact(1)
Q6 | Suppose the first fibonnaci number is 0 and the second is 1. What is the sixth fibonnaci number?
- 5
- 6
- 7
- 8
Q7 | Which of the following is not a fibonnaci number?
- 8
- 21
- 55
- 14
Q8 | Which of the following option is wrong?
- fibonacci number can be calculated by using dynamic programming
- fibonacci number can be calculated by using recursion method
- fibonacci number can be calculated by using iteration method
- no method is defined to calculate fibonacci number
Q9 | Which of the following recurrence relations can be used to find the nth fibonacci number?
- f(n) = f(n) + f(n – 1)
- f(n) = f(n) + f(n + 1)
- f(n) = f(n – 1)
- f(n) = f(n – 1) + f(n – 2)
Q10 | Which of the following gives the sum of the first n natural numbers?
- nc2
- (n-1)c2
- (n+1)c2
- (n+2)c2
Q11 | If GCD of two number is 8 and LCM is 144, then what is the second number if first number is 72?
- 24
- 2
- 3
- 16
Q12 | Which of the following is also known as GCD?
- highest common divisor
- highest common multiple
- highest common measure
- lowest common multiple
Q13 | Which of the following is coprime number?
- 54 and 24
- 4 and 8
- 6 and 12
- 9 and 28
Q14 | In terms of Venn Diagram, which of the following expression gives GCD (Given A ꓵ B ≠ Ø)?
- multiplication of a u b terms
- multiplication of a ꓵ b terms
- multiplication of a*b terms
- multiplication of a-b terms
Q15 | What is the GCD according to the given Venn Diagram?
- 2
- 3
- 5
- 6
Q16 | What is the GCD of a and b?
- a + b
- gcd (a-b, b) if a>b
- gcd (a+b, a-b)
- a – b
Q17 | What is the GCD of 48, 18, 0?
- 24
- 2
- 3
- 6
Q18 | Is 9 and 28 coprime number?
- true
- false
Q19 | If gcd (a, b) is defined by the expression, d=a*p + b*q where d, p, q are positive integers and a, b is both not zero, then what is the expression called?
- bezout’s identity
- multiplicative identity
- sum of product
- product of sum
Q20 | Is gcd an associative function.
- true
- false
Q21 | Who gave the expression for the probability and expected value of gcd?
- james e. nymann
- riemann
- thomae
- euler
Q22 | What is the computational complexity of Binary GCD algorithm where a and b are integers?
- o (log a + log b)2)
- o (log (a + b))
- o (log ab)
- o (log a-b)
Q23 | LCM is also called as
- gcd
- scm
- gcf
- hcf
Q24 | What is the LCM of 8 and 13?
- 8
- 12
- 20
- 104
Q25 | Which is the smallest number of 3 digits that is divisible by 2, 4, 8?
- 100
- 102
- 116
- 104