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.
The code is super short, but honestly I have no idea what's happening there.
I found the description very clear (at least in Python where I did it)
with a line full of spaces, remove them, you end up with ''
with an empty line, keep it as empty line ''
if you have many, like
aaaaa
bbbbb
keep that empty line in the middle, since according to the tests, '\n' gives '\n' (you can have a look at the tests below as examples)
You've passed the kata, that's for the first part. About the second part, duplicated issue. Closing.
So I'm failing on the test that gives input '123' in javascript and expects output '123'. I've console.log'd the input and output for all tests and according to the console I'm literally outputting the exact right answer but it won't take it. I even went so far as to find a different ROT13 kata (https://www.codewars.com/kata/530e15517bc88ac656000716/javascript), copy-pasted my code, and passed that kata on the first try. At the very least this kata should pass when the correct solution is given, but probably also just delete one of the two kata? They're literally the same problem.
Not clear at all what to do in the case that you're given an empty line or a line with one space in it. The description should atleast cover one example of what to do in such a case.
Writing good code also means writing efficient code; if you are getting timeout issue on codewars it's likely that your code is running much slower than it could to reach the same solution.
I finally got it, I realized I wasn't recurring at the depth that I thought I was.
My java solution is recursive and it works.
Passing all tests besides the last two in Java, running into stack overflow errors past about n = 20300. What should I do? Right now my solution is recursive so maybe I should attempt to find a solution with the same time complexity that isn't recursive? I'm guessing a bunch of matrices sitting on the stack isn't great for memory...