Basic Dynamic Programming Algorithm Examples Python Code