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.
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 ?