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.
Why does this work correctly when n=0? Why when n=0 the output is ""?
i learn this line from someone's solution.
you can get the same question in "Replace letters" question.
idk is this the name or not, im just paste(ing)
user:- "KenKamau, fenring76, TFeld, ssfellows, jamsyl, Dima806, zatoichi49, thornejosh, mwk48, akar-0 (+ 7)"
Best solution of all posted
This comment is hidden because it contains spoiler information about the solution
heapq is much more performant especially on larger stuff although modern computing power doesn't require it here though.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I don't know if you are trolling or not..
The whole purpose of this exercice is to check if the pupil is able to produce a simple algorithm that sum the smalest numbers in an array, not his/her ability to use a library...
Furthermore, encouraging behavior like this will just lead to the creation of package that are used to check if an integer is even or odd...
... and make applications use that package as dependency !
Don't take me for a fool, I quite understand the advantages of libraries.
But it's not appropriate for this exercice and I can't beleive that I am the first to spot this.
that would be reimplementing something that already exists
why perform an import when it could be achieved without it ?
Thank you very much Anter69. I get it now!
It's a generator expression: similar in form to list comprehensions, but not the same. Here, the end result is the same, only faster.
You can read more about it e.g. here
Aren't list comprehensions supposed to have [ ]
I'm new at this.
Thank you,
Josh
This is why I love codewars so much, I learned a lot from your solution! thanks!
What is intersection?
Loading more items...