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.
unreadable ninja code.
as always on codewars
This comment is hidden because it contains spoiler information about the solution
It's a spread syntax, than allowed us to find max age in array of age.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax
This comment is hidden because it contains spoiler information about the solution
very good!
If you do it like that, won't it do the divison in every iteration? On top of that, it divides before adding
ageSum
.Can someone explain this code?
How is some() working with every()
thank
^Excuse me, but how do you see the solution from the author?
@jgrunik: I hope you're not talking about yours, because it's exactly the same ;)
"filter" inside "for" solution with worst case has O(n^2), isn't it?
Check my solution. I think it's O(2n)
Worst case:
O(5n)
It's possible to solve this with worst case:
O(n)
It's possible to solve this with a single iteration of the list
Nice One!!
There is no definition of "teen" in kata description. This term differs from country to country and by analogy with other groups, it is logical to assume that in this case it is from 10 to 19 years, inclusive.
In addition, after solving the kata, you can see the solution of the author, from which it also follows that 10 <= 'teens' <20.
Hello!
What is big O for this solution?
Loading more items...