One small doubt

Acording to the recurrence :
dp[n] = 2*dp[n-1] * dp[n-k]

if n = 3 and k = 3, from the array dp[n-1] = 2 and dp[n-k] = dp[0] = 1
sp dp[3] becomes 2*2 - 1 = 3 but he shows it as 4. Why??

hello @Prashant-Kumar-1947183015386369
we subtract dp[n-k] only when it is included in dp[n-1] answer ,
here for n=3 , In dp[2] we have only considered dp[0] and dp[1] (only 2 steps are considered but our window is of size 3).
thats why when we comput answer for 3 , we dont subtract anything.