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.
nvm
Interesting approach. Not very readable but I still kind of like it.
Just realized I have wrong indentations. The first
if
should be one tab forward and thereturn
below that one tab backwards.The second "if" line negates the first "if" line. All "U" letters are turned to "T" and then all "T" letters turned to "U".
Also turning "U" to "T" is wrong in this method. Because you turn DNA into RNA and not vice versa. To the first "if" line can be removed completely
the line "String result = dna;" is not needed. Strings are immutable in java