GATE CSE Greedy Algorithms – Algorithms Practice Test | Set 1

Questions 1-5 of 100

0% completed (0/100 answered)
Your score 0/100 0 answered
Correct 0 Incorrect 0 Unanswered 100 Accuracy 0%

Question 1

MCQ · Single Correct 2 mark

In the Fractional Knapsack Problem with n items, item i has value $v_{i}$ and weight $w_{i}$. What is the greedy choice strategy that guarantees an optimal solution?

Answers for question 1

Question 2

MCQ · Single Correct 1 mark

What is the time complexity of solving the Fractional Knapsack problem for n items when item ratios are not pre-sorted?

Answers for question 2

Question 3

MCQ · Single Correct 2 mark

Why does the Greedy choice strategy fail for the 0/1 Knapsack Problem?

Answers for question 3

Question 4

MCQ · Single Correct 2 mark

In the Activity Selection Problem, n activities have start times $s_{i}$ and finish times $f_{i}$. Which greedy choice yields an optimal schedule with maximum non-overlapping activities?

Answers for question 4

Question 5

MCQ · Single Correct 1 mark

If activities in the Activity Selection Problem are already sorted by finish time $f_{i}$, what is the running time to find a maximum set of mutually compatible activities?

Answers for question 5
Scroll to Top