Concepts4
⚙️AlgorithmIntermediate
Proof Techniques for Greedy Algorithms
Greedy algorithm correctness is usually proved with patterns like exchange argument, stays-ahead, structural arguments, cut-and-paste, and contradiction.
#greedy algorithms#exchange argument#stays ahead+12
⚙️AlgorithmIntermediate
Dynamic Programming Fundamentals
Dynamic programming (DP) solves complex problems by breaking them into overlapping subproblems and using their optimal substructure.
#dynamic programming#memoization#tabulation+12
⚙️AlgorithmIntermediate
DP State Design
Dynamic Programming (DP) state design is the art of choosing what information to remember so that optimal substructure can be reused efficiently.
#dynamic programming#dp state#bitmask dp+11
⚙️AlgorithmIntermediate
Greedy Algorithms
Greedy algorithms build a solution step by step by always taking the best local choice available.
#greedy algorithms#activity selection#interval scheduling+12