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.
Print the inputs.
I'm getting a failed test that isn't very informative and doesn't seem to make sense to me. Can you make the tests give more useful output when they fail, please?
Thanks for the answer!
I called it 5'-3' and 3'-5' originally and I was told that it was confusing. 'Up' and 'down' can be taken to refer to 'upstream' and 'downstream' which are genuine terms: https://en.wikipedia.org/wiki/Upstream_and_downstream_(DNA)
The 'up-down' and 'down-up' pseudo-nomenclature is not helpful. Either call it what it is, 5'->3' and 3'->5', or just call it 'forward' and 'reverse' like we do for oligonucleotides. It's just clearer.
Thanks, that's MUCH clearer than the wording in the instructions.
The instructions don't match the test cases. The instructions say
only words with 5 or more letters should be reversed,
even if the sentence is only 1 word long.
But one of the test cases is failing
on a single word that is only 2 letters long. This doesn't match
the description or the examples you provided in the instructions.
In
[1,2,3]
3
is neither2*2
nor2*2+1
then your sequence is invalid.The provided example (
[1, 3, 6, 13]
forN=13
) works so :3 = 1*2+1, 6 = 3*2, 13 = 6*2 +1
I don't understand the instructions. "either the double or the double plus one of the preceding number" suggests [1,2,3] should be valid output for any sequence with N >= 3, no? Or how do you choose whether the 'unique sequence' result is supposed to be [1,3] ?