I have written a right code , can you please tell me the test cases which got failed and with correct output
My answers are correct but still no test case passed
u have to print number of the test case as well not the val
line 19:
System.out.println("#"+(i+1))+" : "+a[val]);
if this solves your doubt please mark it as resolved 