Test Cases Not getting passed

I am not getting why some test cases are failing?

I am now getting Number Format exception when i unlocked the test case

Hey @kavit Instead of using int or long for the final answer(Biggest Number) Store you answer in a string bcoz as we can see on the constraints of the question element of Array can be 10^5 and take example if n = 3 array = [100000,99999,88888] Biggest no. will be 9999988888100000 and this cannot be fitted into int or long So modify your code to store it in string and then print the string.

Hi Piyush, this point i missed, thanks a lot.

Please tell what and how to modify?

Shall i use stringbuffer in display function?

Where exactly to use string buffer?

Hey @kavit Yes you can definitely use stringBuffer to store the answer in the display function.

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.