Codility MissingInteger, Java

Shows a question where assistance and specific advice on a coding challenge question akin to an exam, hackerrank code challenge, or interview question was asked.

The question is about

Can anyone explain me why I got this two wrong answers?

Especially the first one, if there is only one element in the array, shouldn't the only right answer be 1?

Yet many of the answers have misunderstood, and it's attracting additional new answers to the challenge. (I found it via the review queues for answers myself, and found many others that I believe have slipped through incorrectly)

What should be done?

I flagged the question(to be closed), and several of the answers(as Not-An-Answer), in an attempt to draw attention to moderators, but was called out for flagging for deletion without downvoting, in this comment.

Should I have spent ~32 rep downvoting EVERY answer that was NotAnAnswer? (Update: I've done this)

I don't even have enough flags to cover all the answers that fail to answer OP's question.

People are essentially finding this question when looking for solutions for a challenge used by a company related to hiring, then posting solutions that are Not An Answer for others to find.

If we were a Code Service site this would be fine, but we are a Q & A site, and this does not ANSWER!

Maybe if the question was "What solutions are available for codility challenge xyz?"

But that would likely be closed as too broad, or by people not wanting to be used.

Update: To people seeing "Oh a code challenge meta question" Ask yourselves, if any other question, had attracted > 30 Not-Answers that provided the answer to someone's homework, when they specifically asked "Why did I lose points in the answer to this assignment, I lost points for xyz reasons?" Should those answers be downvoted / deleted? Yes. Should the question be closed? No.

However, the question answer has ~2 seemingly correct answers, and was drowned out by all the non-answers so that people reading their question don't even see the question anymore, they gloss over it and only see the puzzle, Nerd Sniping themselves.

The question asker is unlikely to get new answers unless the existing low quality answers are removed, and the low-quality answers are going to continually receive rep and upvotes by people that do not care about the original question.

It's going to continually attract attention in the first answer, and low quality answer queue, due to the amount of answers that are getting posted that are only code.

That's why I flagged the question to be closed.

  • 9
    It doesn't matter where the question came from, that isn't our headache. Is the question on topic? Check. Is it clear, with code, and with a [mcve]? Check. Is it well written and well formatted? Check. I'd say that's fine to keep. And so are the answers, as long as they answer the question. – cs95 Jun 8 '18 at 4:37
  • 3
    The answers by and large don't I only flagged the question to be closed, not deleted. I've edited the question to reflect this. Note that this isn't your standard whinging about code challenge questions, but that the answers don't even bother to answer op's questions. – Ryan The Leach Jun 8 '18 at 4:38
  • 4
    @RyanTheLeach yes, downvote, that's what i just did. well downvoted 29 of them, the ones which were code dumps with no explanation on why they work or were said to be examples in another language – Memor-X Jun 8 '18 at 4:55
  • 6
    For what it's worth, the amount of answers deserving of downvotes on this question exceeds my daily vote limits. – Ryan The Leach Jun 8 '18 at 6:39
  • @RyanTheLeach I don't see how this is any different from someone posting a hackerrank challenge verbatim here. – Magisch Jun 8 '18 at 7:43
  • 5
    They wern't asking for the solution they were asking for specific assistance, and asking why parts of their code failed. providing the solution to the challenge, without resolving the question askers question isn't an answer. if The question had posted the challenge verbatim, they would be answers, but it wasn't. – Ryan The Leach Jun 8 '18 at 7:45
  • 1
    @RyanTheLeach Alright, I retracted my CV, but I'm still skeptical. – Magisch Jun 8 '18 at 7:50
  • 3
    Remark. NAA flag should only be used for those that doesn't attempt to answer the question. Wrong answers should only be downvoted (and deleted by 10k users), not flagged. – user202729 Jun 8 '18 at 8:59
  • Besides, XY problem is a thing. (not this case) – user202729 Jun 8 '18 at 8:59
  • 2
    Also - the question is very old. I'm not surprised if it attracts many wrong answers. Unfortunately, Stack Overflow make people hate downvoting answers, and ... – user202729 Jun 8 '18 at 9:02
  • those code-only answers are obviously "useful" (in quotes) for people who don't care about OP's problem and just want a solution. You can make a meta question about "useful answers on wrong questions", the general consensus is that they're not useful but this is a more special case -- it's extremely easy to find the answer from the problem source -- in fact the title is designed that way, so remember to mention that if you ask a meta question. – user202729 Jun 8 '18 at 9:07
  • 1
    @user202729 you just posted 5 consecutive comments. Maybe gather your thoughts first ;) – Gimby Jun 8 '18 at 9:12
  • 1
    @user202729 "designed" may be over stating it. I've encountered the xy problem previously, but useful answers still at least try to say why they are solving the question differently. The answers were slowly getting upvotes regardless of how useful they were to the question, so downvoting alone would have been fruitless. The number of answers were also beyond my limits. None of those answers even attempts to answer the question, just post tangentially related code in different languages even. – Ryan The Leach Jun 8 '18 at 9:22
  • 2
    The title (literally) contain the site name and the problem title. It contains nothing about OP's actual problem. It may be overstating but my point holds. / You can downvote and leave a comment, like you did. – user202729 Jun 8 '18 at 9:25
  • 1
    Voting to re-open as the linked post is essentially about link-only answers, while this question is about vaguely-related-to-the-question answers. – Cœur Jun 9 '18 at 4:28

There are a few issues here that I want to enumerate.

  • Flagging those answers as not-an-answer is inappropriate, as was pointed out in the comments. Why is explained well elsewhere, such as here.

  • The question should probably not be closed, as it stands, because there is really nothing wrong with it. The purpose of the code is well-defined, so is the problem with it, and the code snippet itself is small and complete.

That said, I think the Q&A is problematic because it makes it look like it's OK to post off-topic answers like this. (Or at least it did make it look that way, before the off-topic answers were mostly downvoted.)

Anyway, downvoting the answers which do not attempt to answer the original question is fine.

Personally, I would like to see them all deleted, but having them all deleted would require a moderator to help out, so I don't know if that's actually feasible. As long as those upvoted answers exist, though, more will be posted, and I don't think the world actually loses anything by having them all deleted. There are plenty of solutions to this problem online aside from the ones on Stack Overflow.

I think a discussion of whether "How do I solve the Codility missing integer problem?" (being the question that the off-topic answers are implicitly answering) is itself off-topic is more complicated, but it seems safe to assume that it would be closed. Here's an example of it being closed. If somebody feels strongly that Stack Overflow is an appropriate place for such Q&As, I recommend editing that question to fix it up and then trying to reopen it. I'm personally a bit agnostic towards the issue.

By the way, a Google search shows there are more Q&As like this:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .