Hello, I am trying to solve this problem and I am not passing one test case. Please check and tell me where am I getting it wrong.
Problem link: https://online.codingblocks.com/app/player/79595/content/88835/4915/code-challenge
All Indices Problem
@Ibrahim while calling your function you have passed n-1 so it is not checking for the last index
here is the correct code
1 Like
Thank you for the help.