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.

Paper practice 65 questionsPage 19 of 22

Question 45

Open question
CSNAT2 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 answer

Question 46

Open question
CSNAT2 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 answer

Question 47

Open question
CSNAT2 marksNeeds review
Consider the following directed graph G:
Diagram for Computer Science and Information Technology question 47

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