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 is very bad for time execution, I think that the real challenge was to create a solution that involved just 1 loop, and that would reduce the execution time incredible.
This is more beginner friendly & I loved it.
it's O(n)
it's O(n) Btw
"el" is a parameter of the function that is used in filter, it will save the elements of the array in each iteration of filter, so he uses "el" in the function to have each character in the array. I think he named the parameter "el" because of "element". The reason it maybe look's something weird it's because he use a "function expresion"( function(){} ) instead of a "arrow function"( () => {} )
I totally agree with you. This is where the work is done in an array within an array. I saw a great solution here via replace and regExp
It will be considered part of a word and just stays as it is. But the tasks specifies that the input consists only of letters and (single) spaces.
Not all nested loops are inherintly O(n^2). And it is a case here as I explained here
Who the h..l selected current solution as "Best practice" ? Does anybody measures execution time of the functions in here and resources usage ?
or even READABILITY. Give me a break .
Incredible solution, I was shocked
April fools
good
Isn't it the whole point of these coding tasks — to find a performant solution (in terms of big O)?
For anyone looking for a simple and easy to understand one line solution, look at my solution
I think that my solution is better and more productive :)
Loading more items...