What is the main advantage of using dynamic programming over recursion?
-
Dynamic programming is always faster than recursion
-
Dynamic programming avoids redundant calculations
-
Dynamic programming is easier to implement
-
Dynamic programming uses less memory