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 for your feedback, random tests added.
thanks, I added a checker function to randomly test some of the answers
Just pushed the range of k all the way to 10^9.
Common Lisp.
Just curious, what serious language except C does not have sets?
My idea was to let some room for future translations in languages that don't have a builtin
set
, and aset
is iterable in Python. Instead of asequence
, what would you suggest ?It's my first kata, so I don't expect my solution to be fully optimised.
By the way, can you show me an example of the
O(log(n) * log(k))
solution?Fixed
ah fck
I just fixed it on the actual test case, but not the sample
So yeah, fixed.
I've added a new random generator for this specific case. I hope this makes the test suite more robust to catch these things.
I've added random tests that generate pictures with potentially many overlapping regions.
You can try if you want.
Thanks again for the feedback
This comment is hidden because it contains spoiler information about the solution
First, thanks for the feedback! I've made some changes according to your comment.
I've added tests for "overlapping" regions of the same color, and I have updated the solution to account for these cases.
In the process I've simplified the logic to count regions. It was initially prepared for a more difficult problem, but I kept it. Anyway, just for counting regions that complexity is not really necessary, so I've removed it.
You can try again if you want.
Fixed! Thanks for the issue
awesome, thank you-- will fix
Loading more items...