81. Pseudo random number generators can be used for data encryption.
82. Suppose two activities A and B, having start and finish time as SA, FA and SB, FB respectively. Both the activities are said to be compatible, under which of the following condition?
83. Which algorithm is used to solve a minimum cut algorithm?
84. What is the time complexity of the fastest known matrix multiplication algorithm?
85. What is the output of the following code?
#include<stdio.h>
#include<string.h>
void recursive_reverse_string(char *s, int left, int right)
{
if(left < right)
{
char tmp = s[left];
s[left] = s[right];
s[right] = tmp;
recursive_reverse_string(s, left+1, right-1);
}
}
int main()
{
char s[100] = "recursion";
int len = strlen(s);
recursive_reverse_string(s,0,len-1);
printf("%s",s);
return 0;
}
#include<stdio.h>
#include<string.h>
void recursive_reverse_string(char *s, int left, int right)
{
if(left < right)
{
char tmp = s[left];
s[left] = s[right];
s[right] = tmp;
recursive_reverse_string(s, left+1, right-1);
}
}
int main()
{
char s[100] = "recursion";
int len = strlen(s);
recursive_reverse_string(s,0,len-1);
printf("%s",s);
return 0;
}
86. What is the output of the following code?
void my_recursive_function(int *arr, int val, int idx, int len)
{
if(idx == len)
{
printf("-1");
return ;
}
if(arr[idx] == val)
{
printf("%d",idx);
return;
}
my_recursive_function(arr,val,idx+1,len);
}
int main()
{
int array[10] = {7, 6, 4, 3, 2, 1, 9, 5, 0, 8};
int value = 2;
int len = 10;
my_recursive_function(array, value, 0, len);
return 0;
}
void my_recursive_function(int *arr, int val, int idx, int len)
{
if(idx == len)
{
printf("-1");
return ;
}
if(arr[idx] == val)
{
printf("%d",idx);
return;
}
my_recursive_function(arr,val,idx+1,len);
}
int main()
{
int array[10] = {7, 6, 4, 3, 2, 1, 9, 5, 0, 8};
int value = 2;
int len = 10;
my_recursive_function(array, value, 0, len);
return 0;
}
87. Which of the following is a mono alphabetic substitution cipher?
88. Encryption in Vigenere cipher is done using . . . . . . . .
89. What is the general formula for finding the magnitude of the cross product of two vectors a and b with angle θ between them?
90. What is the best case time complexity of quickselect?
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 3
- Miscellaneous on Data Structures - Section 4
- 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