A greedy algorithm is correct when the problem has the greedy-choice property and optimal substructure. Intuitively, you can prove that making the locally best choice can be exchanged into an optimal solution (exchange argument), so the local choice leads to a global optimum.