Sprinklr interview question

DP on strings and ranges.