Reason of failing test case 3

please you could make me understand why is test case 3 failed?? because the same code I ran it on other platform it ran successfully … so please make me understand why it failed here what case I m still missing thank you sir/ma’am

hello @87adarsh.gupta
pls share ur code using cb ide

can u access my code window , i have switched it to collaborate Mode ??/

@87adarsh.gupta
i can see the editor ,but u have written nothing in it

pls follow this->

a) go to https://ide.codingblocks.com/
b) paste ur code in the ediotr
c) go to file option (present on top) ,click it
d) u will see save button,click it
e) a link will be generated in ur search bar, copy that link and share it with me

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

@87adarsh.gupta
modify ur dp a bit.

dp[i] = max(house[i] + dp[i-2], dp[i-1] )
in ur base case
dp[0]=house[0]
dp[1]=max(house[0],house[1])

do let me know if anything is not clear