Qualtrics interview question

Got a well known DP problem.