Nuro interview question

a transformation dp problem based on minimum sum path