Why am I failing in 2 test cases? I have solved as per described in hint solution video

pls help me with the solution

Pls share your code by saving on ide so that I could check it…

239831 is the Id of the problem …I have saved it on IDE now…Once please check it

What are the last 2 test cases ?Can I figure out where am I getting wrong?

I have edited your code… Try to submit now…