Computer Science and Information Technology
2018 · Paper 1
Take it one question at a time. Try an answer, then check your understanding.
Complete GATE CSE 2018 Paper 1 overview, original pages and practice · Timed previous-paper practice
Questions 55–57 of 65. Imported answers require review unless explicitly marked reviewed.
Question 45
Open questionCSNAT2 marksNeeds review
Consider the following program written in pseudo-code. Assume that x and y are integer.
Count(x, y) {
if (y != 1) {
if (x != 1) {
print("*");
Count(x/2, y);
}
else {
y = y-1;
Count(1024, y);
}
}
}
The number of times that the print statement is executed by the call Count(1024,1024) is _____.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 46
Open questionCSNAT2 marksNeeds review
The number of possible min-heaps containing each value from exactly once is _____.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 47
Open questionCSNAT2 marksNeeds review
Consider the following directed graph G:

Choose a value for x that will maximize the number of minimum weight spanning trees (MWSTs) of G. The number of MWSTs of G for this value of x is _____.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer