Time Left - 05:00 mins
ISRO Exam CS 2017 Topic-Wise Quiz PDS( Tree)
Attempt now to get your rank among 482 students!
Question 1
How many different Spanning trees are there with four nodes A, B, C and D?
Question 2
The in-order traversal of a tree resulted in FBGADCE. This tree also follows the property of a heap. Then the pre-order traversal of that tree would result in
Question 3
A B+–tree of order 4 is built from scratch by 10 successive insertions. What is the maximum number of node splitting operations that may take place?
Question 4
Consider a weighted undirected graph with vertex set V = {n1,n2,n3,n4,n5,n6}and edge SetE={(n1,n2,2),(n1,n3,8),(n1,n6,3),(n2,n4,4),(n2,n5,12),(n3,n4,7),(n4,n5,9), (n4,n6,4)}. The third value in each tuple represents the weight of the edge specified in the tuple.
List the edges of a minimum spanning tree of the graph.
Question 5
Consider the following C program segment
struct CellNode{
struct CellNode *leftChild;
int element;
struct CellNode *rightChild;
};
int Dosomething (struct CellNode *ptr)
{
int value = 0;
if (ptr ! = NULL)
{if (ptr – > leftChild ! = NULL)
value = 1 + DoSomething (ptr – > leftChild);
if (ptr – > rightChild ! = NULL)
value = max(value,1 + DoSomething (ptr – > rightChild));
}
return (value);
}
The value returned by the function DoSomething when a pointer to the root of a non-empty tree is passed as argument is
struct CellNode{
struct CellNode *leftChild;
int element;
struct CellNode *rightChild;
};
int Dosomething (struct CellNode *ptr)
{
int value = 0;
if (ptr ! = NULL)
{if (ptr – > leftChild ! = NULL)
value = 1 + DoSomething (ptr – > leftChild);
if (ptr – > rightChild ! = NULL)
value = max(value,1 + DoSomething (ptr – > rightChild));
}
return (value);
}
The value returned by the function DoSomething when a pointer to the root of a non-empty tree is passed as argument is
- 482 attempts
- 1 upvote
- 12 comments
Jun 8GATE & PSU CS