Expedia Group Interview Question

Rod cutting problem, standard DP problem