Smart robber-top down approach not passing all test cases

Can’t identify what is going wrong in this approach, it is failing test case 4. Tried in leetcode, got accepted there.

Hello @Archi please wait i am checking your code:

Hello @
actually could you please share the hackerblocks link of this question because i am unable to find this there:

@Archi try to implement and submit this logic where you are submitting.


if you have any doubt you can ask here:
Happy Learning!!

https://online.codingblocks.com/app/player/177779/content/175891/8514/code-challenge

this is where I am accessing the question

I submitted this, it still fails the last test case.

Hello @Archi actually i dont have access to your portal you have to share the hackerblocks link of this question.
Happy Learning!!

https://hack.codingblocks.com/app/practice/1/1336/problem

Hello see this code for your reference :

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.