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 think that is the programming part here, discovering the math and then implementing it. Looking at the wikipedia page, you're not going to reinvent that through trial and error.
The formula given is a recursive one, which will break, so your programming challenge is how do you make it non-recursive.
This comment is hidden because it contains spoiler information about the solution
Pet peeve.
You can process all 12,000 in under a second. So the test cases should simply be a lookup rather than generating the solution for each random test. This would let you increase the random tests to say 500 or so.
I'm not surprised someone else did it this way, I'm actually more surprised that only 1 other person did it this way.
This comment is hidden because it contains spoiler information about the solution
[ deleted ]
test case: "(abc) def-ghij"
I see some posted (python) solutions that only passed because they hit attempt a few times in a row until they got a set that didn't have the test case they missed.
Suggest you add these test cases:
Indeed :D
I'm blown away by how close this is to the method I came up with. Pretty cool!
@KenKamau and @myjinxin2015
Please either fix the link to indicate the "challenge version" is javascript only, or fix the challenge version to have the same languages.
I don't really want to learn a new language just to clear that kata from my "unfinished kata" list! =DNevermind, I googled enough javascript (how do I write a if/for loop) to put together a solution that worked and I'm happy with.
But I still think you should put a warning on the link.
Do you mean this test:
The answer IS 8. You might have done something wrong.
Sounds like you're evaluating + before - rather than at the same time.
Plz, decribe more about it. Which language?
Loading more items...