Why 3 testcases are wrong?

Where is mistake?

@2000bhaveshkumar hey bhavesh your loop condition is not right your first loop should run from i=0 to i=n-1 and second loop should start start from i+1 to j=n the mistake was in your code you was trying to that location which doesn’t exist.