Time Left - 06:00 mins
BARC CS 2018 Nuclear Quiz -2 (DS)
Attempt now to get your rank among 704 students!
Question 1
The operation
i= pop(s)
Push (s,i)
is equivalent to
i= pop(s)
Push (s,i)
is equivalent to
Question 2
Consider the following directed graph:
The number of different topological orderings of the vertices of the graph is __________.
The number of different topological orderings of the vertices of the graph is __________.
Question 3
If a base condition isn’t specified in a recursive program, what will it lead to?
Question 4
Consider the complete binary tree, with all the nodes in order, sequentially from left to right, generation by generating. For such a complete binary ree, the parent nodes of nodes 24 and 25 would be
Question 5
Consider the following New-order strategy for traversing a binary tree:
• Visit the root;
• Visit the right subtree using New-order;
• Visit the left subtree using New-order;
The New-order traversal of the expression tree corresponding to the reverse polish expression is given by:
• Visit the root;
• Visit the right subtree using New-order;
• Visit the left subtree using New-order;
The New-order traversal of the expression tree corresponding to the reverse polish expression is given by:
- 704 attempts
- 3 upvotes
- 15 comments
Mar 11GATE & PSU CS