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.
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? :)
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'.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 :)
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 :)