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.
Fixed. I didn't write the Java version of the kata, and had not been around here recently, but fixed that (finally). Thanks for pointing out.
Good. :)
I'm using Java.
Finally I figured it out: At first I only counted the fewest continous zeros as frequence, and I should also took one into account.
Still not enough detail, sorry. :(
What language do you use?
The first time I wrote two decode functions (bits->morse + morse->char), and it got "E" expected "EE"
The second time I simply return morseCode (bits->morse), and it got "." expected "E"
All I can do here is repeat: from the code you show I'm not sure what exactly are you doing. Can you provide more details on the functions you mention?
In your first message
testBasicBitsDecoding(MorseCodeDecoderTest)
producedExpected: is "E"
, and here the same piece of code producesExpected: is "EE"
. I can't answer why is this so without knowing what is inside yourtestBasicBitsDecoding
andMorseCodeDecoderTest
.Here is my result:
testBasicBitsDecoding(MorseCodeDecoderTest)
Expected: is "EE"
but: was "E"
With some print I find the input string is "1", why the expected result is "EE" not "E"?
You're absolutely right :D
I wrote this just for convenice and it is somehow a bad habbit keeping using string...
With frequent use concatenation, it would be better to use class StringBuilder.
From the code you show I'm not sure what exactly are you doing. Can you provide more details on the functions you mention?
Hi Jolaf,
I printed the decode bits:
testBasicBitsDecoding(MorseCodeDecoderTest)
Expected: is "E"
but: was ".E"
But when I submit it shows:
testBasicBitsDecoding(MorseCodeDecoderTest)
Expected: is "EE"
but: was "E"
I'm confused: why the expected answer is not the same?
Java version:
default function name should be
multipleOf3
rather thanmatchMultipleOf3