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.
just added a console log on top to see whats up...
const smallEnough = (a, l) => {
console.log(a , l);
return a.length ? a.pop() > l ? false : smallEnough(a,l) : true;
}
some of the random tests fail then for example:
Testing for 2
Log
[ 0, 8 ] 2
It should work for random inputs too - Expected: true, instead got: false
The random tests seem to be incorrect:
for input: [ 0, 3 ] 1
got: It should work for random inputs too - Expected: true, instead got: false
This comment is hidden because it contains spoiler information about the solution
done
fixed description + added sample tests
sorry it's my first Kata, will read about random tests and add them as well