1.

Which of the following algorithms is the best approach for solving Huffman codes?(a) exhaustive search(b) greedy algorithm(c) brute force algorithm(d) divide and conquer algorithmI had been asked this question by my school teacher while I was bunking the class.Query is from Greedy Algorithms topic in division Greedy Algorithms of Data Structures & Algorithms II

Answer»

The CORRECT answer is (B) greedy ALGORITHM

Easy explanation - Greedy algorithm is the best approach for solving the Huffman codes problem since it GREEDILY SEARCHES for an optimal solution.



Discussion

No Comment Found

Related InterviewSolutions