It's UWAweek 47

help3001

This forum is provided to promote discussion amongst students enrolled in CITS3001 Advanced Algorithms.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying the 2 articles in this topic
Showing 2 of 202 articles.
Currently 23 other people reading this forum.


 UWA week 40 (2nd semester, week 10) ↓
SVG not supported

Login to reply

👍?
helpful
12:49pm Tue 1st Oct, Kimberley L.

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?



This article has 1 attachment:

 

SVG not supported

Login to reply

👍?
helpful
2:48pm Tue 1st Oct, Andrew G.

"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

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy