-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
ExerciseThe exercises that are introduced in the lectures.The exercises that are introduced in the lectures.
Description
Write an extension of the multiplication function introduced in the lecture "Recursion", i.e. def multiplication(int_1, int_2, solution_dict)
, by using a dynamic programming approach. This new function takes in input two integer numbers to multiply and a dictionary with solutions of multiplications between numbers, which can be used to retrieve directly the result of such multiplication if already present in it. The function returns the result of the multiplication and, at the same time, modifies the solution dictionary adding additional solutions when found.
Accompany the implementation of the function with the appropriate test cases.
Metadata
Metadata
Assignees
Labels
ExerciseThe exercises that are introduced in the lectures.The exercises that are introduced in the lectures.