Ad
  • Custom User Avatar

    I still think this is worded confusingly, since there are statements which, when taken alone, are not correct.

    "Please note that everyone has at least one sentence and only one people is Mr.Wrong "

    I think this statement is misleading for a few reasons:

    • first, we are not technically looking for Mr. WRONG - we are looking for the person who has no alibi. Mr Wrong is not always Mr. Wrong, he just has noone who can support his claims.
    • "only one people is mr wrong" is just false. This should read "at LEAST one person is Mr. Wrong, and you should return "null" if there is more than one Mr. Wrong OR if you cannot conclude that someone is Mr. Wrong."

    This is a 2 Kyu, so I guess it can be hard. However, i think the difficulty comes from non-elegant components of the description. I am not sure how you would fix this. Either the explanation needs a big overhaul, or you should remove test cases that conflict with the description.

  • Custom User Avatar

    Thanks. That IS a big misunderstanding on my part - this really changes up my logic.

    Upon review - I do not see the phrase "someone is ALWAYS lying" in the description. I think this should be added. "There is always at least 1 liar - in thhe case of MULTIPLE liars or if it is inconclusive, return None."

    Neat problem! I think the description is really key here.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I failed a test requiring no "PARTITION" clauses because I has a commented-out line with "PARTITION" in it. Maybe the tests should ignore commented-out lines? I realize that it might be bad form to leave tons of comments, so I don't feel too strongly about this.

  • Custom User Avatar

    Thanks. I was unfamiliar with it.

  • Custom User Avatar

    Is this slower than a join? The "WITH" clause is OK, but why not do a join? Seems like you are filtering down from a much larger data set.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    remember, you are creating a view, not just a select statement. That helped me along on this.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution