Please login

Prime

Prepinsta Prime

Video courses for company/skill based Preparation

(Check all courses)
Get Prime Video
Prime

Prepinsta Prime

Purchase mock tests for company/skill building

(Check all mocks)
Get Prime mock

TCS Digital Dynamic Programming Quiz- 2

Question 1

Time: 00:00:00
In which technique  memoization. works ?

Bottom up

Bottom up

Top down

Top down

both a and b

both a and b

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 2

Time: 00:00:00
In which technique tabular method works?

Bottom up

Bottom up

Top down

Top down

Both a and b

Both a and b

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 3

Time: 00:00:00
where we got an optimal maximum profit in the knapsack with the capacity W=25 in greedy approach

24

24

36

36

18

18

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
 Which is the following is/are property/properties of a dynamic programming problem?

Optimal substructure

Optimal substructure

Overlapping subproblems

Overlapping subproblems

Greedy approach

Greedy approach

Both a and b

Both a and b

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

Please login to submit your explanation

Start

Question 5

Time: 00:00:00
 If a problem can be broken into a sub problems which property reused subproblems

Overlap subproblems

Overlap subproblems

Optimal structure

Optimal structure

Memoization

Memoization

Greedy

Greedy

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

Please login to submit your explanation

Start

Question 6

Time: 00:00:00
When the Top down approach of dynamic programming is applied , it usually

Decrease time complexity and space complexity

Decrease time complexity and space complexity

Decrease the time complexity and increase space complexity

Decrease the time complexity and increase space complexity

Increase time complexity and decrease the space complexity

Increase time complexity and decrease the space complexity

Increase time complexity and space complexity

Increase time complexity and space complexity

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

Please login to submit your explanation

Start

Question 7

Time: 00:00:00
Which of the following problem is using a greedy algorithm.

o/1 knapsack problem

o/1 knapsack problem

Fractional knapsack problem

Fractional knapsack problem

Matrix chain multiplication problem

Matrix chain multiplication problem

Edit distance problem

Edit distance problem

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 of the following problems should be solved using dynamic problem?

Quicksort

Quicksort

Mergesort

Mergesort

Binary search

Binary search

Longest common subsequence

Longest common subsequence

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

Please login to submit your explanation

Start

Question 9

Time: 00:00:00
What is the time complexity of the huffman coding?

O(n)

O(n)

O(nlogn)

O(nlogn)

O(n(logn)2)

O(n(logn)2)

O(n2)

O(n2)

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

Please login to submit your explanation

Start

Question 10

Time: 00:00:00
Construct minimum spanning tree using Prim's algorithm starting with the node A. which one of the following sequences of edge represents a possible order in which the edge would be added t o construct the MST? 

(E,G),(C,F),(F,G),(A,D),(A,B),(A,C)

(E,G),(C,F),(F,G),(A,D),(A,B),(A,C)

(A,D),(A,B),(A,C),(C,F),,(G,E), (F,C)

(A,D),(A,B),(A,C),(C,F),,(G,E), (F,C)

(A,B),(A,D),(D,F),(F,G),(G,E),(F,C)

(A,B),(A,D),(D,F),(F,G),(G,E),(F,C)

(A,D),(A,B),(D,F),(F,C),(F,G),(G,E)

(A,D),(A,B),(D,F),(F,C),(F,G),(G,E)

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

Completed

0/0

Accuracy

0%

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%

Comments