1
GATE CSE 2018
MCQ (Single Correct Answer)
+2
-0.6
A queue is implemented using a non-circular singly linked list. The queue has a head pointer and a tail pointer, as shown in the figure. Let $$n$$ denote the number of nodes in the queue. Let $$enqueue$$ be implemented by inserting a new node at the head, and $$dequeue$$ be implemented by deletion of a node from the tail. GATE CSE 2018 Data Structures - Linked List Question 3 English

Which one of the following is the time complexity of the most time-efficient implementation of $$enqueue$$ and $$dequeue,$$ respectively, for this data structure?

A
$$\theta \left( 1 \right),\theta \left( 1 \right)$$
B
$$\theta \left( 1 \right),\theta \left( n \right)$$
C
$$\theta \left( n \right),\theta \left( 1 \right)$$
D
$$\theta \left( n \right),\theta \left( n \right)$$
2
GATE CSE 2018
Numerical
+1
-0
The postorder traversal of a binary tree is $$8,9,6,7,4,5,2,3,1.$$ The inorder traversal of the same tree is $$8,6,9,4,7,2,5,1,3.$$ The height of a tree is the length of the longest path from the root to any leaf. The height of the binary tree above is ______.
Your input ____
3
GATE CSE 2018
MCQ (Single Correct Answer)
+2
-0.6
Let $$G$$ be a simple undirected graph. Let $${T_D}$$ be a depth first search tree of $$G.$$ Let $${T_B}$$ be a breadth first search tree of $$G.$$ Consider the following statements.

$$(I)$$ No edge of $$G$$ is a cross edge with respect to $${T_D}.$$ ($$A$$ cross edge in $$G$$ is between
$$\,\,\,\,\,\,\,\,$$ two nodes neither of which is an ancestor of the other in $${T_D}.$$)
$$(II)$$ For every edge $$(u,v)$$ of $$G,$$ if $$u$$ is at depth $$i$$ and $$v$$ is at depth $$j$$ in $${T_B}$$, then
$$\,\,\,\,\,\,\,\,\,\,\,$$ $$\left| {i - j} \right| = 1.$$

Which of the statements above must necessarily be true?

A
$$I$$ only
B
$$II$$ only
C
Both $$I$$ and $$II$$ only
D
Neither $$I$$ nor $$II$$
4
GATE CSE 2018
Numerical
+2
-0
Let $$G$$ be a graph with $$100!$$ vertices, with each vertex labelled by a distinct permutation of the numbers $$1,2, … , 100.$$ There is an edge between vertices $$u$$ and $$v$$ if and only if the label of $$u$$ can be obtained by swapping two adjacent numbers in the label of $$v.$$ Let $$𝑦$$ denote the degree of a vertex in $$G,$$ and $$𝑧$$ denote the number of connected components in $$G.$$ Then, $$𝑦 + 10𝑧 =$$ _____.
Your input ____
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12