"Kimberley Lee" <24*1*8*
7@s*u*e*t*u*a*e*u*a*> wrote:
> find.py
>
> My output matches the expected output provided in the question, but I’m still receiving a 'wrong answer' message. I've also created a test case, and my solution successfully passes it.
>
> I understand that there are hidden test cases. How can I effectively debug this issue if I don’t know where my solution is failing?
Hi,
Exploring the properties of the problem space to find, understand, and fix your bugs is an intended part of the task.
A good practice is to explore small, simple solutions and try to find the simplest input for which your algorithm is incorrect, so you can analyse this and determine your error.
If you are unable to find such an error by hand, you can write a program to generate random inputs for you. This is called "fuzz testing". This is typically so you can compare your algorithm against a slower algorithm that you are more confident is correct, but for very small inputs you can even provide answers by hand and see where the mismatch is.
It is also very much possible that you have misread or misunderstood the problem statement, and so it never hurts to read it again carefully.
Cheers,
Gozz