Consider a variant of the task scheduling problem where each activity has a cost c associated with it, and the problem now is to find a set of non-conflicting activities such that the cost is minimized. Which of the following algorithms is most suitable for solving this variant of the task scheduling problem?
A. Depth-first search (DFS)
B. Breadth-first search (BFS)
C. Greedy algorithm
D. Dijkstra's algorithm
E. Bellman-Ford algorithm