JPMorganChase interview question

Dynamic programming questions like decode ways and paint fence.