Google interview question

LC Medium variants. String problem and 2D Dynamic programming