21. How many times will the function fibo() be called when the following code is executed?
int fibo(int n)
{
if(n == 1)
return 0;
else if(n == 2)
return 1;
return fibo(n - 1) + fibo(n - 2);
}
int main()
{
int n = 5;
int ans = fibo(n);
printf("%d",ans);
return 0;
}
int fibo(int n)
{
if(n == 1)
return 0;
else if(n == 2)
return 1;
return fibo(n - 1) + fibo(n - 2);
}
int main()
{
int n = 5;
int ans = fibo(n);
printf("%d",ans);
return 0;
}
22. Vigenere table consists of . . . . . . . .
23. What will be the lexicographical order of permutations formed from the array arr={1,2,3}?
24. What is the computational complexity of Binary GCD algorithm where a and b are integers?
25. Chan's algorithm is used for computing . . . . . . . .
26. Which of the following was the first diagram substitution cipher?
27. In a graph, perfect matching exists only if the number of vertices is even.
28. Which of the following is used as signal duration in Morse Code?
29. How many combinations of 2 elements will be formed from the array arr={1, 2, 3}?
30. Minimum number of moves required to solve a tower of hanoi problem with n disks is . . . . . . . .
Read More Section(Miscellaneous on Data Structures)
Each Section contains maximum 100 MCQs question on Miscellaneous on Data Structures. To get more questions visit other sections.
- Miscellaneous on Data Structures - Section 1
- Miscellaneous on Data Structures - Section 2
- Miscellaneous on Data Structures - Section 4
- Miscellaneous on Data Structures - Section 5
- Miscellaneous on Data Structures - Section 6
- Miscellaneous on Data Structures - Section 7
- Miscellaneous on Data Structures - Section 8
- Miscellaneous on Data Structures - Section 9
- Miscellaneous on Data Structures - Section 10
- Miscellaneous on Data Structures - Section 11
- Miscellaneous on Data Structures - Section 12