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.
Definitely clever, not sure why people tend to vote best practices on solutions that are nearing code golf level of cleverness though. If most people were straight up handed this code at their job, it'd take them a while to even figure out what it does, let alone work with it.
That was an excellent Kata.
Piece of advice for everybody working on it: Read the description and think about what you know about the problem.
Don't be like me, going down a rabbit hole of memoization, optimal factorization algorithms, and obscure code features, only to finally sit down and read the description carefully.
This problem doesn't require any of that.
That immediately solved it, thanks bkaes. I totally forgot about the hoops you have to go through to "copy" an object in Ruby.
Changing it to dna.dup fixed it.
Perhaps just constructing a new string would be better?
This comment is hidden because it contains spoiler information about the solution
Has the same problem whether I manipulate the input or not, going to post a screenshot.
This comment is hidden because it contains spoiler information about the solution
Input: GGGTTTTCTTTCACC
Expected: "GGGTTTTCTTTCACC", instead got: "CCCAAAAGAAAGTGG"
The random tests are expecting the output to be the same as the input.
The random tests seem to be broken, they seem to expect the output to be the same as the input, instead of the complement.
This is for the Ruby version.