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.
Sorry – I had just checked that your "cheat" solution had been invalidated and that none of the other ones were.
I've implemented your suggestion and now it should be fixed. 😅
Well, now the message is flipped:
It should be user result first instead of the expected.
My suggestion is to run the reference solution first and put the result to a variable, then match user solution with the variable like this:
Should be fixed now 👍
https://www.codewars.com/kata/reviews/64abed357cbb0400010acc5b/groups/667669efae093df165d30e93
It's just that no one has approved it yet. Maybe there aren't enough Julia coders who can approve translations.
It seems like some translations do take a long time to be approved. Some of the ones for this kata have been waiting for 17 months! I'd say the site probably needs to overhaul the whole way that translations are approved.
why did no one approve it?
I asked myself the same question, this is not an easy kata to rank. I would say 5-kyu or 4-kyu if the number of islands in the test was choosen so that all brute-force solutions fail, but any "textbook" implementation of the correct algorithm succeeds, regardless of language-dependant optimizations.
If the implementation must be optimized (i.e. choosing the right data structure) in consideration of the high "density" of the bridges, then definitely 4-kyu, but it is not clear to me if that's what you required.
A performance edition could be created (2-kyu maybe) where the number of bridges is so high that some upfront reduction is necessary (see my other comment hidden as spoiler) leveraging the 2D nature of the points representing the islands.
Congrats! And thank you for the kind words.
Yes, I picked the maximum number of islands carefully 😈
Out of interest, what kyu rating would you give it?
Everyone's is! 😅
Finally made it, barely beating the clock! Thanks for this super kata.
I tested a few solutions provided by others and they all seem to be in the same order of magnitude as mine. I guess for the 5000 islands case even small optimizations matter.
My solution is a roll of the dice to see if it'll finish in time, haha.
Hmm... maybe another hint then, or at least something to try: some people made use of heap queues, which I've found seem to speed up even non-optimal algorithms dramatically (especially ones where you need to repeatedly find the minimum item).
Tried two or three modifications of that already, but not the right ones apparently! On the upside I'm learning more about computational geometry.
I wouldn't say it's that obvious. Personally, I think this should be 3 kyu – it was approved when it was easier, before I could increase the number of islands as much as I fully intended. Now it's stuck at 4 kyu 🤦. Just be thankful you're not doing it in JS – that version has 15,000 islands 😅! But anyway, you're 1 kyu, so it shouldn't be too much of a problem.
But if you're really stuck, here's a hint (I'm pretty sure you already know it though)...
Thanks for getting back to me. I wanted to use numpy for matrix multiplication in one of my first attempts. I've tried several approaches that solve the problem but are too slow on 5000 islands, unless I use scipy. I wonder if I should replicate "that algorithm" in scipy (not saying more to avoid spoliers), but it looks a bit too challenging for a 4-kyu kata. I must be missing something obvious here 🙂
Loading more items...