Test-case failure

i am getting run-error for one test-case. can’t figure out why.

hi @tusharbhardwaj127, you have missed some corner cases

  1. at line 15, instead of while(i<=len) it should be while(i<len) as i should take value btw 0-(len-1)
  2. at line 19, you have to check if j <len ,else you will get runtime error
    here , i have corrected your code

In case of any doubt feel free to ask :slight_smile:
If you got the answer then mark your doubt as resolved