Question d’entretien chez Palantir Technologies

Cutting the rod problem. DP + Backtracking.