Out of three test cases,
1st test case outputs “Number Format Exception”
at line 8, i.e.,
int n = Integer.parseInt(str);
I don’t know y this error as “str” will always be a number as it is the size of the array. Can u explain this?