Chewbacca and Number error in Testcase 1 and 2

I have designed this code to work with negative integers and positive integers . Cases 1 and 2 give runtime error , what could be possible scenario please suggest something.

Hi Abhinav
Please take care of the constraints. You need to use long in order to solve the question.

Hi @ranaabhinav50
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.