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.
The conditions are reversed, while not exactly the same the function is continuos when n or m are 0 so, the result is the same.
I think here sould be 'OR' instead 'AND'. It said in task`s condition..
it's very good
Clever! I added an extra line I suppose
Use spoiler flag next time, your post was visible in the homepage.
This comment is hidden because it contains spoiler information about the solution
Got fixed
6 years later it looks like the (current) limit of 500 is fine
Should I increase
N
to a much higher value, or is this kata a duplicate: https://www.codewars.com/kata/59951f21d65a27e95d00004f?You should avoid making a kata performance-dependent without a good reason. Either clearly state in the description that the solution should be high-performance or reduce the number of tests. 400 is an unnecessarily large number of tests unless the kata is specifically about performance.
I edited the tolerance in the "small test" below (just 0.1) and the small test worked fine. Maybe its another problem with my solution, but the error whats showing up when i want to submit is "Use assertEquals(expected, actual, delta) to compare floating-point numbers".
Are you sure that the missing tolerance is a problem here? Dimensions of a block are integers, no tolerance should be necessary.
Cant pass Submit because in the Test (Java) assertEquals has no tolerence values.
It depends on what you're working on. If this function were part of a website backend counting characters in usernames or something, it doesn't really matter at all. But if this is a helper function that is responsible for comparing billions of base pairs in genetic sequencing or part of a stock trading platform where microseconds matter, then you need to rethink it.
Would it matter? I assume itll be a O(2n) vs O(n) but I'm not sure if that's a big deal.
Loading more items...