Computer Science and Information Technology
2019 · Paper 1
Take it one question at a time. Try an answer, then check your understanding.
Complete GATE CSE 2019 Paper 1 overview, original pages and practice · Timed previous-paper practice
Questions 46–48 of 65. Imported answers require review unless explicitly marked reviewed.
Question 36
Open questionCSMCQ2 marksNeeds review
Consider the following grammar and the semantic actions to support the inherited type declaration attributes. Let
,
,
,
,
, and
be the placeholders for the non-terminals D, T, L or
in the following table:Production rule | Semantic action |
|---|---|
D → T L | .type = .type |
T → int | T.type = int |
T → float | T.type = float |
L → , id | .type = .type; addType(id.entry, .type) |
L → id | addType(id.entry, .type) |
Which one of the following are the appropriate choices for
,
,
and
?Your answerChoose one option.
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 37
Open questionCSMCQ2 marksNeeds review
There are
unsorted arrays:
. Assume that
is odd. Each of
contains
distinct elements. There are no common elements between any two arrays. The worst-case time complexity of computing the median of the medians of
isYour answerChoose one option.
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 38
Open questionCSMCQ2 marksNeeds review
Let
be any connected, weighted, undirected graph.
I.
has a unique minimum spanning tree, if no two edges of
have the same weight.
II.
has a unique minimum spanning tree, if, for every cut of
, there is a unique minimum-weight edge crossing the cut.
Which of the above two statements is/are TRUE?Your answerChoose one option.
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