X interview question

First question was based on DP