dp for just recurrence