Question: a) Explain the concept of a greedy algorithm.
b) Provide an example of a greedy algorithm that produces an optimal solution and explain why it produces an optimal solution.
c) Provide an example of a greedy algorithm that does not always produce an optimal solution and explain why it fails to do so.