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.
I didn't give a maximum length. I figure a moderate amount of input. I had a random number generator that did like 5-10 numbers.
I went ahead and made it quit out if it gets a leading 0 so [1,2,3,0,2,3] will only return 2:
123 + 0 - 23
and123 - 0 - 23
I think everyone's going to figure out that they need to compose a string of arithmetic to produce this and if they can write a method that takes the string and parses it out, that's what I meant by not using eval. My solution doesn't use eval.
I love how this is scalable to other denominations. Well done!
I really like this solution. Very concise and readable.
This comment is hidden because it contains spoiler information about the solution
Have you guys gotten this running in Python yet? I'm able to get the provided tests done but I believe I'm running into some floating point rounding issues. Can you guys confirm that you were able to get the python solutions working?
Looks good to me. Thanks for adding another example too; I think that will help show what you intend.
description needs to be cleaned up a bit.
Awesome solution! I really like how you avoided nested loops with this solution.
Agreed. I think it was just something I did to explicitly show what i was returning while we could've just left it to the implicit None returned. Also, couldn't these be turned into lambda functions for even more concise coding.
well played sir.
Good catch. I was wondering why this kata was not accepted by more people and I assume that was a cause of major frustration. Thanks for finding it.
This comment is hidden because it contains spoiler information about the solution
Loading more items...