Scaler Academy Interview Question

Coding Question based on Dynamic programming