AMD interview question

Medium LC questions involved dynamic programming related problems.