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
How did this work out for you ?
As soon as i created a new Array with the size of ls,
i got an error stating, i had too little memmory.
Why would this not be a good solution for a 1000 item array.
Have you missed the fact that this solution has a default case wich works for any amount of items.
Or am i missing something here?
How did this get past the tests?
Schould't this result in a type error ?
null cannot be assigned to number[]
At least thats what i get.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
It says in the description, that you should not iterate through all numbers from 1 to the input number.
You have to come up with a way to reduce the upper bound of your range of numbers to check.
Ask yourself the question :
What is the largest possible number that could be a divisor of x, that i NEED to check.