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.
nerd :P
@brendanvos
Your own solution also mutates the original list passed trough the function.
Out of curiousity i tried your solution in Pycharm. I stored [1, 1, 1] in a variable x, stored 10 in varuable y, called the function with (x, y) parameters and after requested a print(x). Both the print(function) and print(x) yielded the same result.
This comment is hidden because it contains spoiler information about the solution
I did some tests and found this one to be the quickest running of the simple and intuitive solutions.
That doesn't change anything, because you're using additionnal if/else logic in the loop, on your side. It's like saying that
3*N
is different ofN*3
. Additionally, python being python, the single loop with more code/branching logic is most likely slower than the 3 passes using builtins.You don't need else-statement after the loop in that case.
This solution was submitted for older version of the test framework. You need to run it with python 3.6
Doh, right.
But why can't I fork and run it'?
This fails on 2.
Yeah but it's not very efficient as it uses for loops. See my solution. BTW I had initially came up with this solution but I improved before submitting.
It is necessary, for example equal_to_24(55, 26, 30, 5) would give with his solution a "It's not possible!", however 26-((55+5)/30) = 24.
This is very simple and clean!
I don't see how you will, even if you skip a solution here, if it exists you'll get it later reordered because of parentheses, but feel free to prove me wrong.
If you only use one try you will skip potential returns and miss potential solutions!
right :) i got a bit lucky apparently
Loading more items...