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.
Thanks, I've updated the test cases as suggested!
Hey, thanks for the python translation!
Your suggestions sound good and hopefully I'll have time to implement them on the weekend,
but feel free to update the test cases for Java if you feel like it :)
That might actually be a big help since I'm not as familiar with Python, meaning the Java test cases may be a good reference for me when applying the necessary changes to C# and JS..
Cheers and happy coding!
Nice one!
Cool, thanks a lot! I've lowered the range of the values in the random test case to reflect the [-100, 100] range in the description and added the three example test cases to the Ruby version :)
Cheers!
Thanks, I've now also updated the Java and C# test cases to allow for a tolerance of up to 1e-10.
Fixed :]
True, I've updated the description to include a link to the following page: http://farside.ph.utexas.edu/teaching/301/lectures/node28.html
Thanks for letting me know, it should now be fixed!
Weirdly, the codewars Test framework doesn't seem to support equality checks using a tolerance parameter :/
Marked as resolved.
True, you could check the length of the array at grid[0] to get the number of columns. However, the grid is a jagged array rather than a two dimensional one and could technically contain arrays with differing lengths, even though in this kata that won't be the case.
I could update the C# (and Java?) versions to use a 2d array, but I believe Javascript doesn't support this and would still need to use the jagged version.
Using rows and columns seems a bit more expressive than grid.Length and grid[0].Length, but does make the method signature bulkier.
Try submitting your code again, as the issue should now be fixed (if you are using C# or Javascript). There was a glitch in the matrix.. sorry
Good idea using flood fill, but not quite efficient enough.
Update: OK, so the C# and Javascript versions have been updated and should now work correctly.
I've also lowered the maximum rows and columns to 2000 and 500 respectively. For some reason trying to publish changes to the Java version always results in a timeout, so it has not yet been updated.
Edit: The Java solution should now also be working correctly.
Yup, have been able to recreate this issue. Will update the solution as soon as the the codewars website stops timing out..
Have found the problem (used the wrong variable as an index somewhere) and fixed it, but am still unable to publish the changes.
"The server timed out while trying to publish your changes."
Loading more items...