1
GATE CSE 2015 Set 1
MCQ (Single Correct Answer)
+1
-0.3
Match the following:

List 1

(P) Prim’s algorithm for minimum spanning tree
(Q) Floyd-Warshall algorithm for all pairs shortest paths
(R) Mergesort
(S) Hamiltonian circuit

List 2

(i) Backtracking
(ii) Greedy method
(iii) Dynamic programming
(iv) Divide and conquer
A
P - iii, Q - ii, R - iv, S - i
B
P - i, Q - ii, R - iv, S - iii
C
P - ii, Q - iii, R - iv, S - i
D
P - ii, Q - i, R - iii, S - iv
2
GATE CSE 2015 Set 1
MCQ (Single Correct Answer)
+2
-0.6
Consider a max heap, represented by the array: 40, 30, 20, 10, 15, 16, 17, 8, 4.
Array Index 1 2 3 4 5 6 7 8 9
Value 40 30 20 10 15 16 17 8 4

Now consider that a value 35 is inserted into this heap. After insertion, the new heap is

A
40, 30, 20, 10, 15, 16, 17, 8, 4, 35
B
40, 35, 20, 10, 30, 16, 17, 8, 4, 15
C
40, 30, 20, 10, 35, 16, 17, 8, 4, 15
D
40, 35, 20, 10, 15, 16, 17, 8, 4, 30
3
GATE CSE 2015 Set 1
Numerical
+2
-0
The least number of temporary variables required to create a three-address code in static single assignment form for the expression $$q + r / 3 + s - t * 5 + u * v/w$$ is _______________.
Your input ____
4
GATE CSE 2015 Set 1
MCQ (Single Correct Answer)
+2
-0.6
A variable x is said to be live at a statement $${S_i}$$ in a programif the following three conditions hold simultaneously:

i. There exists a statement $${S_j}$$ that uses x
ii. There is a path from $${S_i}$$ to $${S_j}$$ in the flow graph corresponding to the program
iii. The path has no intervening assignment to x including at $${S_i}$$ and $${S_j}$$

GATE CSE 2015 Set 1 Compiler Design - Code Generation and Optimization Question 9 English

The variables which are live both at the statement in basic block 2 and at the statement in basic block 3 of the above control flow graph are

A
p, s, u
B
r, s, u
C
r, u
D
q, v
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12