TCS NQT Dynamic Programming and Greedy Algorithm Quiz-1

Question 1

Time: 00:00:00
 Traveling salesman problem is an example of ?

Dynamic Algorithms

Dynamic Algorithms

Divide and Conquer

Divide and Conquer

Greedy Algorithms

Greedy Algorithms

Recursive Approach

Recursive Approach

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 2

Time: 00:00:00
What is an example of the Dynamic programming

Fibonacci Series

Fibonacci Series

Dijkstra Shortest path

Dijkstra Shortest path

Tower of hanoi

Tower of hanoi

All of the above

All of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 3

Time: 00:00:00
 Minimum number of moves required to solve the Tower of hanoi puzzle is

2n²

2n²

2^(n) - 1

2^(n) - 1

2^(n)+1

2^(n)+1

None of them

None of them

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

B will be right option

Start

Question 4

Time: 00:00:00
Project scheduling is the example of

Greedy programming

Greedy programming

Dynamic programming

Dynamic programming

Divide and conquer

Divide and conquer

none of the above

none of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 5

Time: 00:00:00
 Which of the following uses memorization

Greedy approach

Greedy approach

Divide and conquer

Divide and conquer

Dynamic approach

Dynamic approach

none of these

none of these

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 6

Time: 00:00:00
Program with highest run time complexity is

Prime number series

Prime number series

Fibonacci Series

Fibonacci Series

Tower of hanoi

Tower of hanoi

None of the above

None of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 7

Time: 00:00:00
 The recurrence relation capturing the optimal time of the Tower of Hanoi problem with n disc is

T(n)=2T(n-1)+1

T(n)=2T(n-1)+1

T(n)=2T(n-1)+n

T(n)=2T(n-1)+n

T(n)=2T(n-2)+2

T(n)=2T(n-2)+2

T(n)=2T(n/2)+1

T(n)=2T(n/2)+1

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 8

Time: 00:00:00
 which one is the design algorithm that is used to find all the pair  of shortest distance in a graph ?

Greedy

Greedy

Backtracking

Backtracking

Bellman-Ford algorithm

Bellman-Ford algorithm

Divide and conquer

Divide and conquer

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 9

Time: 00:00:00
 Which of the following has a loss less compression in the greedy algorithm?

Kruskal’s minimum spanning tree

Kruskal’s minimum spanning tree

Prism minimum spanning tree

Prism minimum spanning tree

Dijkstra shortest path

Dijkstra shortest path

Huffman coding

Huffman coding

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 10

Time: 00:00:00
 What is the weight of the following kruskal minimum spanning tree ?

37

37

39

39

32

32

31

31

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"]

Buy TCS NQT Paid Materials

Paid Materials TCS NQT

Join TCS NQT Online Classes

Personalized Analytics only Availble for Logged in users

Analytics below shows your performance in various Mocks on PrepInsta

Your average Analytics for this Quiz

Rank

-

Percentile

0%

Completed

0/0

Accuracy

0%