Time Left - 15:00 mins

Live Quiz Session Questions of PDS and Algo : 23/01/2018

Attempt now to get your rank among 567 students!

Question 1

Consider the following statements
I. For every weighted graph and any two vertices s and t, Bellman-ford algorithm starting at s will always return a shortest path to t.
II. At the termination of the Bellman-ford algortithm, even if graph has negative weight cycle, a correct shortest path is found for a vertex for which shortest path is well-defined.
Which of the above statement are true?

Question 2

Solve the recurrence: T(n) = 2T(n1/2) + logn

Question 3

how man perfect matching are there in a complete graph of 6 vertices?

Question 4

for the table of 12 items given below, we use Radix sort to sort them
19, 13, 05, 27, 01, 26, 31, 16, 02, 09, 11, 21
What will be the output, when items of buckets are merged after the first distribution?

Question 5

A hash table has space for 100 records. Then the probability of collision before the table is 10% full is

Question 6

Consider the following traversals of binary search tree:
Post-order: 1, 3, 5, 4, 2, 6, 9, 11, 13, 12, 10, 8, 7
Inorder : 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13  
Find the number of nodes in the last level of binary search tree. Assume root is at first level.

Question 7

Consider a binary max-heap implemented using an array.
Which one of the following array represents a binary max-heap ?

Question 8

public class Main
{
public static void main(String[] args)
{
int i=3;
int a=(i*+3);
String st="code";
String final_st=st+a+0;
System.out.println(final_st+"final");
}
}
What will be printed as output of above code ?

Question 9

Consider the following elements are inserted into an empty AVL tree in the given order.
6, 8, 4, 2, 25, 21, 17, 7, 3. How many rotations are applied to construct an AVL tree with the given elements.

Question 10

When are linked lists considered linear data structures?
  • 567 attempts
  • 5 upvotes
  • 12 comments
Jul 4GATE & PSU CS