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.
This is the last example in the discription, and should be
false
as the discreption indicates.This test case must be wrong for some languages.
I'm stuck on the same case in Rust, yet it has 1k solves.
I assume the case was meant to have 19, 19, 190, not three 19s.
I am afraid I do not understand you completely.
Yes, we are positive. My code indicates the answer for this particular testcase is
false
. I have described the reason in previous message.From your answer I understand the output should be 'false'.
Therefore, kata returning assertion error as follows:
seems to me like a bug. Testcase expects the result to be
true
, where my code and your answer states it should befalse
.If my thinking is wrong, could you please elaborate a bit more? :)
Read the description carefully. What you print is not the case expecting true.
Pretty sure there is a bug in Kotlin testcases.
My code to print test cases:
Execution
Result
Expected true, but in
b
array there is value 36100. sqrt(36100) = 190. There is no 190 in array 'a'.Right but it also doesn't specify what color socks you should wear. Both of those things are out of scope for the kata.
In Java I had to specify value returned, when there is no N found in given range.
This case is not specified in kata. Saying it will never happen does not prevent me from handling such a case.
I returned '-1' when there is nothing found. It works, but I would much rather know how to program it, rather than guess.
Also I must agree, that for such an easy task it has way too much explanation and examples.
Sexy
Thank you, fellow warrior :)
in SQL katas, you don't have to build a function/procedure (I mean, you can, but it isn't what makes you complete the kata), but you have to write a
SELECT
statement that is returning all the results. I guess you forgot that part.=> copy your current code, then reset the trainer and you'll see the initial code. You just have to modify it a bit to pass the kata.
I am trying to pass it in SQL. I have developed proper method in local postgresql (create function past(h integer, m integer, s integer) and all logic under it) and by calling it select past(1,2,3); it generates proper response. But pasting my postgresql method here returns with errors, the answers are quite different. Please, guide me how those SQL kata should be entered :)