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.
it is called a list comprehension, similar to the lambda function, because of how syntax's can be written on a single line.
[] is used for list comprehension.
To return a list i think
Question, why used "[]", because I thought the same but used ()
it's illegal
Could you explain an efficient solution which avoids doing this?
Wow that's cool
I've just wrote them an email with this idea=).
That's actually a much better idea, and should really be trivial to add.
You could even I think quite easily add statistics like speed percentile for the given language. That would make unusually slow solutions stand out and lead people to question why that might be.
That being said, I don't think this site sees a lot of development so this might be a fool's hope :P
This is a very good solution: the highest performance (according to test results) and short code
Just because they're done easily doesn't mean they're the best. This makes multiple passes over an array
Or as an option, developers of this web site will have add something like load tests and show avg execution time near each sulution in such test. to give developerse oppotuniti competting in whose code is the most effective. And also add the fastest code filter in here. And the same to memory usage. Also such statistic may be useful to newbe.
Feels like the "Best Practices" button should be restricted or disabled entirely, since a whole bunch of people will upvote anything that's crammed into a neat one-liner as "Best Practices" even if it's horrendously inefficient.
Not that my code is exactly brilliant, but from the comments on a lot of these I get the feeling that many people are learning terrible habits.
Easy:D
Well Done! Best Practice!
O(n)+O(n) complexity?
Loading more items...