Optmyzr interview question

Dynamic programming was there in the two tests