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 would add further that if you'll look for a pattern in the comments, it seems that a higher proportion of higher ranked users made comments than what might be typical of a 5 kyu problem. I think that might be corroborating support for my previous reply.
The basic tests all pass. Sometimes the random test are off significantly, sometimes they're off marginally, and occasionally it passes. A little greater clarity in the description and/or adding tests that are more reflective of a possible random scenario would be helpful. Normally, if I have random tests failing, I simply log the input to refactor my code against. It's much more difficult to take that approach in this case. Again, it's just my opinion.
The instructions could be more explicit. Also, if the random tests are going to break pattern with the visible tests, it might be fair to include an example of that function call signature. I prefer a challenging concept over a challenge to gather the author's intent. Just my 2 cents.
This was a straighforward kata, AFTER deciphering the expectations. The description could be written a bit more clearly. Some users are not working from a freshly studied CS algorithm textbook, and thus are actually drawing upon purely reason, logic, and programming utility, and may not associate this with the better known 'connect the ropes' to provide valuable context in the acceptance criteria. Examples showcasing the malleabillity of subsequent ordering, e.g. the cost need not necessarily be added immediately in the operation immediately following the addition of two elements.
Whereas the mathematical solution to this is impressive, this one is more easily found under a simple Google search, and thus gives up something in the way of originality. To those who solved it without opening any tabs, kudos!
To be honest, the actual solution set isn't near the extreme of challenge, but the expectations are somewhat ambiguous. Perhaps more/better examples of expected inputs could be provided.
I actually have a live version of this game, and a couple of others in javascript and jQuery, at www.cj-innovations.com . Personally, I wouldn't have used the prototype chain and newing up instances for the problem. I would have used a simple function called "compareHands" that would take 2 arguments. That's just my personal opinion. It makes it easier to jump between text editor and test environment, and allows greater focus on the algorithm itself. Take it with a grain of salt.
I just passed 51 tests, and I'm still getting a timeout failure. A previous comment suggested that the number of tests is lower than this number. Have the tests been changed?
Thanks, I really appreciate it. I was thinking the given constraints only applied to the first summation. Since the second summation can exceed the limit, I assumed it could go below the start also.
I'm having an issue that isn't making sense. I'm passing 47 of the tests, but I critiqued the first point of failure by grabbing the input with 'console.log' and I double checked the math by hand, and a solution exists, but the test case expects 'Nothing'. The first case occurs when the inputs are 2177, 4357. The solution my code returns is [2295, 2024], which meets the s(n) + 1 = s(m) + 1 standard. I appreciate any insight into this anyone can offer.
I keep getting a timeout error. The same code run locally takes less than 4 ms on average, even with 500 characters. If I remove everything but a simple console.log(), it still runs at 667ms, so I'm guessing the issue resides in the server. I appreciate any insight thay anyone can offer.
I just saw the place where it's listed. It's an easy mistake for someone just learning databases, especially since mySQL is the most popular version. I appreciate you bringing it to my attention. My previous comment was not an attack on your puzzle. I was questioning the platform itself, since I haven't used Codewars for database problems. I assumed incorrectly that all SQL problems were of the same version. I won't make that mistake again.
I see. I didn't see an option for flavors.
This comment is hidden because it contains spoiler information about the solution
This exercise appears to either be behind in technology, or otherwise inconsistent with modern mySQL, because I have empirically tested a short string of code that works without errors in mySQL Workbench that is showing errors here.
Loading more items...