Groups
Category
Greedy algorithm correctness is usually proved with patterns like exchange argument, stays-ahead, structural arguments, cut-and-paste, and contradiction.
Dynamic programming (DP) solves complex problems by breaking them into overlapping subproblems and using their optimal substructure.