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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
It's almost like a hard coded solution but shrunk down to avoid taking too much space on the one line
This was very difficult for a 7 Kyu kata and most of that difficulty comes from the optimization stage. I do think optimization can work in 7 Kyu, but not on a somewhat complex problem as GCDs.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Why are you using
(t+"")
? Is this to naturally convert to string so there are no compile errors?How come there is no solution from you to view? I wanted to know how you got a simple implementation out of this kata.
Why am I getting downvoted for looking out for newer programmers? I am in agreement that the writing builds character and I see why they would use 2 parameters. This wasn't a specific jab at this kata, it was a generalized question I genuinely wanted an answer to
Definitely the most unique solution I've seen here, and I'm genuinely surprised this passed the performance test given it run through 3 for loops and utilitizes Math.Pow
That's impressive
We programmers know our kind too well
How does a beginner go about understanding this regex? I can follow the parenthesis and understand the asterisks, but it's difficult to grasp the logic behind searching for the given sets of 0s and 1s. I can't even understand how to normally solve this kata without a regex, so I feel bad for getting stuck on this 4 kyu when I've completed others at this difficulty level.
Actually the straight forward part was figuring out the rearrange. I've gotten so many bugs from the actually swapping of numbers that I want to quit and it's all because I am working with a long which has many less methods than a standard int.
This comment is hidden because it contains spoiler information about the solution
I saw solutions use interpolated strings via
return $"{value1}{value2}";
and was wondering if that's considered more effecient or better practice than manually concatenating a string viareturn str[range] + str[range];
? I know for writing to console that you should be using interpolated strings but this is my first time seeing it being used to return a string.This should not spoil the kata, I have not provided any details on the string or values.
Loading more items...