Https://ide.codingblocks.com/s/257776

dont know why giving wrong ans :frowning:

@Muskan-Gupta-598128740703036 let me check ur code.

@Muskan-Gupta-598128740703036 hey dp[0] will be a[0] similiarly for dp[1] and dp[2] because we are including current element in recurrence relation,please make these changes.