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.
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.
Kata description says - ""Dash" – is 3 time units long.". This is the rule I am following.
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.
I getting following error in test 2 and 4:
expected: but was:
I don't understand the error.