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.
When do you manage to complete kata in less than an hour?
I must be terrible... or overambitious with my choices xD.
Was surprised my bruteforce first try didn't timeout! Would have been interesting to try with huge arrays ... Nice kata anyway!
Nice cata! You would not believe the time a spent to realize that having no parentheses was a valid option
I think adding a note about it won't hurt anyone, like "your function will be tested with big numbers" or whatever you think is ok.
Hi psmilliorn. It is very clear in the basic tests that everyone can see that a loop based solution will not work. You don't even need special maths to pass this, just some tinkering around with basic operators. I have no purpose to fail solutions, there is only a kata with very visible test cases that need to be passed, nothing more. This is not a "performance" kata, there is no special data structure of complex algorithm needed. In real life, if you had to implement something like this for your job, would you or your boss be satisfied with a solution that runs minutes or completes in milliseconds?
Just my thoughts, but if your going to have random test with numbers so large you are intentionally trying to fail solutions on the basis of a time then you should mention in the description that is your purpose. There are many solutions that work to solve this issue, but you are intentionally seeking only one math solution, and again intentionally omitting a programmatic one.
Thanks Luminux. I have updated the test cases and reference solution to what @Bouchert below has suggested. I'm not the author of the C# kata, I only created the javascript version, so I wasn't aware of the float rounding issues.
First of all i'm sorry for my excessive behavior towards you! I guess i must have been having a rough day... (not that it's any excuse)
Regarding the issue at hand, I was attempting it in C#!
Hi Luminux. Can you tell me what language you were using to complete the kata? This kata is quite old and I'm not very active on this site anymore, at least when it comes to authoring katas. Before a kata can go live, it is in beta status. When enough users have completed it and ranked it, it can be approved by a power user. There's quite a bit of back and forthing before it is a ranked kata. Hopefully by then, the bulk of issues would have been sorted out, so things like basic tests would have tested thoroughly, not just by me, but the hundreds of other users that have completed it, so I find it unexpected when a user raises an issue for basic tests. This leads me to believe that my description is most likely not conveying what I need to be done or what I have seen countless times, users skim over the description and basic tests and then implement the wrong thing, thus leading to their frustration and then lashing out. It would be great if you could tell me what test is wrong and why you think it is wrong so I can understand where you're coming from. You need to understand that everyone that authors a kata does this for the community and no one here gets paid so it is very disappointing to me when I see behaviour such as yours. Please answer the questions I have asked you so I can have a look otherwise I'm closing this issue.
wow, very anger
it says you authored 0 kata (at least using that account) which means this author still needs you to show how it is done ;)
Not a kata issue. Closing.
This comment is hidden because it contains spoiler information about the solution
As several people pointed out the basic tests are plain wrong! I seriously question how this mess of a kata managed to get 91% approval from the community! Wasted serious amount of time on a author mistake . . .
Edit: After looking at the responses regarding issues in other katas from this author it seems he is truly incompetent since he refuses to solve the clear issues. It seems his idea of contribution to this website is to force the users to waste time on trivial bullshit!
this was a fun one!
Loading more items...