Time Left - 12:00 mins

Algorithm : Nuclear Quiz 1

Attempt now to get your rank among 251 students!

Question 1

Consider the following strings x and y.
x=”gradeup”
y=”gateexam”
How many longest common subsequences are possible from x and y?

Question 2

Consider the following Fibonacci recursive function used by dynamic programming.

Assume for every function call F(i) it checks the table first, if its value is already computed it retrieves the value from table. Otherwise it calls a recursive function call to compute its return value. Whenever a function F(i) computes first time its return value is stored in the table to avoid the redundant function calls.
How many function calls need the support of stack to complete the execution of the function F(5)?

Question 3

Consider the following direct graph

 
What is the adjacently matrix after floyd’s algorithm applied on the above graph to find all the pairs shortest paths?

Question 4

Which of the following is used to solve 0/1 knapsack problem?

Question 5

Find out the maximum profit for fractional knapsack with maximum allowable weight=11, n=5
(p1, p2 ,p3, p4, p5) = (32,25,15,27,36)
(w1, w2, w3, w4, w5) = (8,1,1,2,6)

Question 6

What is the minimum number of the multiplications required to multiply the following three matrices.

A3x7, B7x2 and C2x9

Question 7

What is the best data structure to implement topological sort on directed graph?

Question 8

What is load factor in hash table?

Question 9

If there is costly swap operation then which of the following have minimum number of swap operations?

Question 10

Which of the following is true about Counting Sort:
  • 251 attempts
  • 2 upvotes
  • 1 comment
Jul 22GATE & PSU CS

Posted by:

Harshita AgarwalHarshita AgarwalMember since Jul 2020
Share this quiz   |