The server has a 12 second time restriction iirc. This program takes a really long time to run as others have pointed out, O(n^2). In a simple prompt like this maybe you can get away with it, in more complex prompts getting into the habit of nesting for loops can quickly get out of hand.
two years late, but you and I had the exact same issue. there is a way to solve it though; think of how you would solve this on a square grid, and notice what the algorithm behind it actually does to each individual piece.
my first 1kyu kata solved! this was an amazing kata, spent damn near 2 weeks on this, but it was really worth it. thank you, jaybruce, for making this; that's 83 people very satisfied with this kata now :)
The server has a 12 second time restriction iirc. This program takes a really long time to run as others have pointed out, O(n^2). In a simple prompt like this maybe you can get away with it, in more complex prompts getting into the habit of nesting for loops can quickly get out of hand.
Scala translation
Your solution is provided the solved grid as a reference.
Change link in description to https://loopover.xyz/
Description should really link to https://loopover.xyz/
It's quite hard to experiment with non-square grid sizes since the code in the link provided does not seem to easily adjust to it.
is this always alphabet order for solved one ?.. like in the example?..and maybe some more example test,, thx
You'll see all solutions when you upload your own.
haha lol, its just that when seeing "There is no solution to show" pop up, I thought you had already given up on this kata.
Hi man. I did it already ) Let me know if you need a help with theory. Cheers.
two years late, but you and I had the exact same issue. there is a way to solve it though; think of how you would solve this on a square grid, and notice what the algorithm behind it actually does to each individual piece.
my first 1kyu kata solved! this was an amazing kata, spent damn near 2 weeks on this, but it was really worth it. thank you, jaybruce, for making this; that's 83 people very satisfied with this kata now :)
oh wait, I've figured it out!
oh shit, my bad, I forgot to add it
how about adding the spoiler tag, djeezes
Loading more items...