Can anyone plz tell me why my code gives tle.On google search most of them have solved it using bottom top dp. Here's the lonk for problem.Is there any bug in my code or top bottom is slow due to function calls? I have added code in comments thank u.
Auto comment: topic has been updated by Pushkar-PM (previous revision, new revision, compare).
I am not getting how to format code in question so putting code in comments even though i used block.
why downvotes? Cant we ask doubts on blog. Just asking whether it is not allowed
Auto comment: topic has been updated by Pushkar-PM (previous revision, new revision, compare).