Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
But we are? We just take the information that there must be exactly one Mr. Wrong into account when finding him. He is still Mr. Wrong, and he still lies. The only difference is that we determine that what he says are lies by confirming that what everyone else says is true, and therefore what he says must be lies.
You are incorrect. The description is accurate, there is always exactly one Mr Wrong. The only times at which you should return
null
is if you cannot determine who it is. The test cases are actually generated by creating a list of people, choosing one of them at random to be Mr Wrong, and then creating statements for each person, making sure that only Mr Wrong's statements are lies.It seems to me like perhaps you are misunderstanding what "Mr Wrong" is. "Mr Wrong" is a single person, who always tells lies. It is not merely anyone who says something that contradicts with another person. There can be, and always is, exactly one person who is Mr Wrong.
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:
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.
Fred is Mr. Wrong by process of elimination. Its either Fred is a liar, or there are multiple liars
Currently the description says:
And then later:
Do you find this unclear?
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.
I think there may be some confusion here, but the task says there is ALWAYS one person lying.
If one of the persons is Mr. Wrong, then by elimination it cannot be Tom (that would entail Bob lying as well), cannot be Bob, nor Gary - by the same logic. Only Fred states something that isn't backed up by the others. So if someone IS lying, it must be Fred; and the tasks says someone IS lying in every example.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
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.
Thanks. I was unfamiliar with it.
this where clause gets optimized and acts as a join, no performance cost here
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.
This comment is hidden because it contains spoiler information about the solution
remember, you are creating a view, not just a select statement. That helped me along on this.
Loading more items...