11. Compute the product matrix using Strassen's matrix multiplication algorithm.
Given a11=1; a12=3;a21=5;a22=7
b11=8;b12=4;b21=6;b22=2
Given a11=1; a12=3;a21=5;a22=7
b11=8;b12=4;b21=6;b22=2
12. What is the GCD of a and b?
13. What is the total running time of the binary GCD algorithm?
14. What will be the output of the following code in java?
import java.util.ArrayList;
public class LRU {
public static void main(String[] args) {
int page_frame = 3;
int page_ref_string[] = {1, 2, 4, 1, 0, 3, 2, 0, 5, 4};
ArrayList<Integer> s=new ArrayList<>(page_frame);
int count=0;
int page_faults=0;
for(int i:page_ref_string)
{
if(!s.contains(i))
{
if(s.size()==page_frame)
{
s.remove(0);
s.add(page_frame-1,i);
}
else
s.add(count,i);
page_faults++;
++count;
}
else
{
s.remove((Object)i);
s.add(s.size(),i);
}
}
System.out.println(page_faults);
}
}
import java.util.ArrayList;
public class LRU {
public static void main(String[] args) {
int page_frame = 3;
int page_ref_string[] = {1, 2, 4, 1, 0, 3, 2, 0, 5, 4};
ArrayList<Integer> s=new ArrayList<>(page_frame);
int count=0;
int page_faults=0;
for(int i:page_ref_string)
{
if(!s.contains(i))
{
if(s.size()==page_frame)
{
s.remove(0);
s.add(page_frame-1,i);
}
else
s.add(count,i);
page_faults++;
++count;
}
else
{
s.remove((Object)i);
s.add(s.size(),i);
}
}
System.out.println(page_faults);
}
}
15. Running key cipher is a variation of?
16. Which of the following is made possible by the use of Polybius square?
17. What is the minimal Hamming distance between any two correct codewords?
18. To which class does the Euler's circuit problem belong?
19. Consider the following iterative solution to find the sum of first n natural numbers:
#include<stdio.h>
int get_sum(int n)
{
int sm = 0, i;
for(i = 1; i <= n; i++)
________;
return sm;
}
int main()
{
int n = 10;
int ans = get_sum(n);
printf("%d",ans);
return 0;
}
Which of the following lines completes the above code?
#include<stdio.h>
int get_sum(int n)
{
int sm = 0, i;
for(i = 1; i <= n; i++)
________;
return sm;
}
int main()
{
int n = 10;
int ans = get_sum(n);
printf("%d",ans);
return 0;
}
Which of the following lines completes the above code?20. What is the minimum number of cuts that a graph with 'n' vertices can have?
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 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 11
- Miscellaneous on Data Structures - Section 12