Google Interview Question

LC Medium variants. String problem and 2D Dynamic programming