If your question contains code that doesn't work as intended…
If your question contains something like:
- ... runs ...but it gives the wrong answer...
- ...I tried ... but sometimes...
- ...works great when I do ..., but when I do ...
- ...it works fine, but I also need it to do ...
- ...it fails a test case... (**unless that test case is a performance test)
then your code does not work in the way that you expect, or need.
Special note about code that produces the correct results, but runs slower than expected/required in a challenge or competition: if this is the only failing test case then these questions are on-topic, but use the tag time-limit-exceeded.
Broken code is code that:
- cannot possibly compile even if other dependencies are included
- fails to run (crashes, throws exceptions, core-dumps, segfaults, etc.)
- produces results that are obviously incorrect (fails unit test cases, etc.)
Please don't be offended that we put your question on hold. In our experience, Code Review answers can be much more productive when the code is working correctly. Putting the question on hold gives you a chance to fix obvious problems. Once answers start rolling in, you will no longer be allowed to alter the code in the question, since it would be unfair for reviewers to evaluate a moving target.
The most straightforward action would be for you, the author of the question, to edit the question to fix the bug(s).
After you edit the question, it will be automatically put into a queue where other users will vote to reopen it, if they consider the code to be in a working state. You shouldn't need to flag a moderator to request reopening. If your question hasn't been reopened in a few hours, it is likely that other users still consider your code to be broken.
If your question was improperly closed because we misinterpreted your question, edit the question to clarify your intentions.
Resources that may be useful
- If you are trying to solve a common problem, try searching to see if a similar question has already been asked on Code Review.
- You may find Stack Overflow to be a useful resource in fixing your bug. First, try searching to see if a similar question has already been asked on Stack Overflow. Note, however, that simply reposting the same question to Stack Overflow will likely result in a rejection there as well. (A good Stack Overflow question would typically include a simplest possible example that reproduces the bug, explain the expected behaviour, and state the unexpected results. You shouldn't post your entire program and ask strangers to help you debug it for you.)