TCS Ninja Dynamic Programming and Greedy 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

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!"]

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/10

Accuracy

0%

Get Prepinsta Prime

Get all 200+ courses offered by Prepinsta

Never Miss an OffCampus Update

Get OffCampus Updates on Social Media from PrepInsta

Follow us on our Media Handles, we post out OffCampus drives on our Instagram, Telegram, Discord, Whatsdapp etc.

Get Hiring Updates
Amazon,Google,Delottie & 30+companies are hiring ! Get hiring Updates right in your inbox from PrepInsta

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.

Get PrepInsta Prime Subscription

Get access to all the courses that PrepInsta offers, check the out below -

Companies

TCS, Cognizant, Delloite, Infosys, Wipro, CoCubes, KPMG, Amazone, ZS Associates, Accenture, Congnizant & other 50+ companies

Programming

Data Structures, Top 500 Codes, C, C++, Java Python & other 10+ subjects

Skills

Full Stack Web Development, Data Science, Machine Learning, AWS Cloud, & other 10+ skills and 20+ projects