Passes test cases, but why WA? Please help.
Bro it’s failing this test case
4 3 2 1
You are comparing
if ( A[i] == K )
but , According to question you have to find the index means you have to do
if ( i == K )
and it will be accepted
Two changes, Add a line
inside the if condition.
Yo bro you too study in grade 9