Fractal Interview Question

Machine learning coding question ; Dynamic programming