Which of the following algorithms are greedy algorithms?
GATE CSE · Algorithms
Master topic for Greedy Technique. Includes Greedy Algorithms, Huffman Coding.
47 questions · 0 PYQs · 7 AI practice · GATE CSE 2027
Which of the following algorithms are greedy algorithms?
Which of the following problems is solved optimally using a greedy approach?
In the context of greedy algorithms, the 'cut property' used to prove the correctness of Prim's and Kruskal's MST algorithms states:
Consider the following statements about Prim's and Kruskal's algorithms for MST:
(i) Both always produce the same MST for a given graph.
(ii) Prim's is generally preferred for dense graphs; Kruskal's for sparse graphs.
(iii) Both are greedy algorithms based on the cut property of MSTs.
(iv) Kruskal's requires a Union-Find data structure; Prim's does not.
In Huffman coding, the greedy algorithm always merges the two trees with the smallest frequencies. This greedy choice is optimal because:
Which of the following problems CANNOT be solved optimally using a greedy algorithm?
The Activity Selection Problem selects the maximum number of non-overlapping activities from a set of n activities, each with a start time sᵢ and finish time fᵢ. The greedy strategy that always produces an optimal solution is:
Want unlimited AI-generated Greedy Technique questions?
Sign up free and practice with adaptive difficulty — Easy, Medium, Hard. New questions every session.
Start practising for free →