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.
It is a question not an issue. The tests are the same in all languages and 6749 guys passed the kata.
In my solution, I test these conditions at the top but it still does not pass the test cases when length of a and b are 0. It should return false but my code is returning true.
I tried everything but can not resolve the issue. I post the whole code if you want.
Please read further starting from "However, the standard does not specify how long that "time unit" is".
Kata description says - ""Dash" – is 3 time units long.". This is the rule I am following.
Please read the kata description carefully: "if you have trouble discerning if the particular sequence of
1
's is a dot or a dash, assume it's a dot".In this particular case you have no way to find out if
111
is a dot or a dash, so assume it's a dot.I can only repeat what I said some time ago about Java
For One of the test Case I get this error message. Before Expected I prited out passed bits string. Converted code and than string from morse code.I think output I am getting is correct. Code for - is T and for . is E. Doesn't than mean this test case is broken.
testExtraZerosHandling(MorseCodeDecoderTest)
01110
Letter j is - code for it is T
✘
Expected: is "E"
but: was "T"
I had the same issue with my java program. But I successfully improved the performance. You need to make sure that you don't brute force throught the nested loops inside the sumin and sumax. If you look at the table given in question you will see a pattern in the occurence of number for both min and max.
My solution passes all the cases in submit but failing for test case number 4. It gives the error message "expected false but find true". I think the array size for that case is 0. I have that if condition in my code and by printing out I know it goes inside the condition and returns false. I am not getting what is the problem. Can somebody help on this? I am using java programming language.
console.log
how can i print my input and output? i am using javascript.
Please which language? Print your input and your output in your console so you will be able to see your error.
I getting following error in test 2 and 4:
expected: but was:
I don't understand the error.