Time Left - 12:00 mins

ISRO CS 2019 : DS Booster Quiz 2 (App update required to attempt this test)

Attempt now to get your rank among 617 students!

Question 1

The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height 5 are?

Question 2

What is the maximum size of operator stack, when converting following infix expression to postfix expression. Assume  as the highest precedence and follows right associativity.

Infix:     
m p * q * r + a * b c

Question 3

Consider the following function.
int fun (int n)

ifreturn (n% 10);
else return fun

What is the return value of fun(9874)?

Question 4



What appears in List 2 after completion of above code ?

Question 5

Consider a max heap represented by the array elements:
{50, 25, 22, 17, 16, 15, 12, 10, 9}. The following operations are carried out: 17 is deleted, 24 is inserted. The number of operations to heapify is

Question 6

We have two linked lists P and Q of length m and n respectively. (m>n)
The time complexity to check whether the two linked lists have an intersection node or not is :
For example :

Question 7

In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is

Question 8

How many minimum number of link (address) fields are modified to insert a new node in the middle of doubly linked list of 11 nodes?

Question 9

Consider the following code which is being implemented on a binary tree :
void ABC(struct Node* node)

{

  if (node==NULL)

          return;

  else

  {

          struct Node* temp;

          ABC(node->left);

          ABC(node->right);

          temp = node->left;

          node->left = node->right;

          node->right = temp;

  }

}

 
What does the code is performing on the binary tree ?

Question 10

Consider the following statements :

S1 : Prim's algorithm will generate connected graph in every step but Kruskal's algorithm may generate disconnected graph in some step.

S2 : Bellman Ford algorithm can find all negative edge weight cycles present in the graph.

   

  • 617 attempts
  • 1 upvote
  • 1 comment
Dec 21GATE & PSU CS