Prim's algorithm repeatedly takes the cheapest edge, so it is greedy. Floyd-Warshall builds shortest paths from smaller subproblems, so it is dynamic programming. Mergesort splits and merges, so it is divide and conquer. Finding a Hamiltonian circuit is done by trying paths and backing out of dead ends, so it is backtracking.
More Greedy Techniques questions
GATE 2017 CS (CS1) Q15– Consider the following table: Algorithms Design Paradigms --- --- (P) Kruskal (i) Divide…
GATE 2014 CS (CS2) Q48– Sorted sequences P,Q,R,S,T have lengths 20,24,30,35,50. Merge them into one by merging two…
GATE 2017 CS (CS2) Q60– Characters P,Q,R,S,T have probabilities 0.22,0.34,0.17,0.19,0.08. A 100-character message…
GATE 2021 CS (CS2) Q36– Assign a binary prefix code to each letter of abbccdddee. For letters with equal…
GATE 2007 CS Q76– Letters a, b, c, d, e, f have probabilities1/2, 1/4, 1/8, 1/16, 1/32, 1/32 respectively.…
GATE 2007 CS Q77– Letters a, b, c, d, e, f have probabilities1/2, 1/4, 1/8, 1/16, 1/32, 1/32 respectively.…