You need to sign in or sign up before continuing.×
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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
more funny katas
This comment is hidden because it contains spoiler information about the solution
if there another language not working you should try another one :V
I have failed 100 random cases and i do not know why
[-9, -15, -2, -16, 18, 16, 'A', -11.143047152343609, -10, -16, -12, 7, 16, -17, 9, -18, 7, 15, -11, -3, 3, -13, 11, -18, 12.459426828479579, -13, -7.3537210160318125]
should equal[]
, there are some float values and negative ones but what is the condition? i think description is not very helpful.i think this kata is better than string functional compared selection (edit 5 kyu difficult aproximately)
the basic approach i can think of is to iterate over that given range (a, b) and check if two first numbers are primes and evaluate the other conditions but using a for loop just cause
'execution time out'
it should be a way to reduce this but i think is related to some numerical theory termsI have defined a function 'is_prime' but each time i call this is time consumption very high, then, to take that condition of just first two digits, i have concluded that are just between 2, 100 prime numbers, then i have defined as an array of prime numbers
is there a method from math (like ceil/floor) to index correctly as string when having a lenght odd and even to accumulate sum by left-right and keep middle elements?
this kata should be 8 difficult category