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.
oh
so I choose the exact opposite interpretation.....
thx for your patience,
the "new" interpretation makes it a bit easier ;)
The meaning of "consecutive" is explained in the description: "By not consecutive we mean not exactly 1 larger than the previous element of the array." So basically numbers which differ by more than one are not consecutive. In the example
[4,6,7,8,9,11]
the6
is not consecutive, because it does not come (as a natural number) after 4.hm, thx for the rply at first.
as I understand it, the logic of the consecutiveness is defined by the first two entries....
(and therefore the first two entries can never be the answer...)
... am I wrong?
Did you test your solution with examples? Did you try this test case?
test.assert_equals(first_non_consecutive([4,6,7,8,9,11]), 6)
Your solution has a bug and fails when the answer is on position
1
, for example[0, 2, 3]
. You need to fix it.This comment is hidden because it contains spoiler information about the solution
Thank you for explanation!
Sorry for being a bit glib. Here are your options:
Meanwhile, translating is the most involved process, and less like simply having the chance to solve it in the language of your preference and then move on.
I guess also you could just
But if you want to translate it from JS or TS, there is some documentation on translating a kata.
Best of luck!
not really, I'm new here.
Should i adapt this kata for other languages?
And now you know what to do, plain and simple.
I would like to decide this kata, but only JS and typescript :-/
Nice kata! This turned out to be a challenge for me :D
The expected answer for that test is
'1,3,5,7,9'
. The input should be[1,3,5,7,9]
Print the input, there are no consecutive numbers there. All even numbers in between the odds are missing.
What's means this test?
Many non-consecutive elements:
expected '1_3_5_7_9__' to equal '1,3,5,7,9'
I don't understand...
Whilst I enjoyed this exercise, it is not well explained and is certainly not an 8kyu.
Loading more items...