TCS 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

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

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

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

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

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

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

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

Question 9

Time: 00:00:00
 Which is 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

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

null
null

Buy TCS Prog. Logic (C MCQ) Paid Materials

Join TCS 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%

Get over 200+ Courses under One Subscription

mute

Don’t settle Learn from the Best with PrepInsta Prime Subscription

Learn from Top 1%

One Subscription, For Everything

The new cool way of learning and upskilling -

Limitless Learning

One Subscription access everything

Job Assistance

Get Access to PrepInsta Prime

Top Faculty

from FAANG/IITs/TOP MNC's

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.