Myntra interview question

Frog jump of leetcode using DP