Please solve this dsa error

Describe your issue

not able to do this dsa even after trtying 50 times also used ai for completion after submiiting error is coming and error is like if my code is of 50 lines error is coming on 55 line which doesnot exist

Screenshot

Additional info

and i also think that given sample input is wrong please solve this issue asap.

Describe your issue

not able to do this dsa even after trtying 50 times also used ai for completion after submiiting error is coming and error is like if my code is of 50 lines error is coming on 55 line which doesnot exist

Screenshot

Additional info

and i also think that given sample input is wrong please solve this issue asap.

Hi @harshvprs,

There is no issue with the problem. You just need to complete the function that was provided in the template.

The error you are facing is because instead of completing the given function, you wrote the code from scratch.

To fix this, reset the template using the option in the top-right corner of the editor, and then complete the function as instructed.