+ 3
How slove.this error=Array.index.out.bound.excdption
hi htts://code.sololearn.com/c7BFcXUY9975/?ref=app
3 Antworten
+ 3
sorry I didn't get...
+ 2
If you enter "
1
1 1 2 2 "
The program will work because the for loop for the second table will only execute once.
the error will be if we enter e.g.
"5
1 2 3 "
Because the second for loop want to do 5 times and the second array has size 3.
In both for loops references the variable n which represents only the size of the first array
+ 1
Because the first list can be larger than the second