After 3 intents my code passed but I 've had fails with logs like this:
Expected: undefined, instead got: ' A \n W \n W \nPBBPTQOICUDRZ\n N \n P \n U \n O \n Z \n C \n L \n U \n L \n M \n C \n N \n T \n X \n M \n T \n R \n'
The tests occasionally go haywire. If I keep submitting my solution it eventually errors. This does not seem to be a problem with my code.
In the example below with str1 = NAOOKDQTSRJMWJZIFCO str2 = MTAJCBXVVUOGPTQXTUHKO, the tests expect a value of "undefined".
Expected: undefined, instead got: 'NAOOKDQTSRJMWJZIFCO\n T \n A \n J \n C \n B \n X \n V \n V \n U \n O \n G \n P \n T \n Q \n X \n T \n U \n H \n K \n O \n'
... which visually looks correct:
NAOOKDQTSRJMWJZIFCO
T
A
J
etc.
I'm just saying for JS I used \xa0\ for spaces as mentioned here https://stackoverflow.com/questions/33539797/how-to-create-string-with-multiple-spaces-in-javascript. When I entered my results it gave me errors. I spent alot of time trying to figure out why it didn't work. the "expectecation" and the "actual" results from the tests were the same. Then I decided to use " " as in " ".repeat(). It was frustrating trying to figure out why the answer was not accepted.
Fixed in your fork
The example should display the correct number of leading spaces.
The description should be independent of any specific programming language (should be language-agnostic).
After 3 intents my code passed but I 've had fails with logs like this:
It seems random tests generate invalid strings.
Duplicate issue.
Don't suggest how to do it.
clue: try str2 = MTAJCBXVVUOGPTQXTUHK
The tests occasionally go haywire. If I keep submitting my solution it eventually errors. This does not seem to be a problem with my code.
In the example below with str1 = NAOOKDQTSRJMWJZIFCO str2 = MTAJCBXVVUOGPTQXTUHKO, the tests expect a value of "undefined".
Thanks for completing the Kata, a good and compact solution! I just used plain text spaces in the test expectation as Codewars displays in plain text.
I'm just saying for JS I used
\xa0\
for spaces as mentioned here https://stackoverflow.com/questions/33539797/how-to-create-string-with-multiple-spaces-in-javascript. When I entered my results it gave me errors. I spent alot of time trying to figure out why it didn't work. the "expectecation" and the "actual" results from the tests were the same. Then I decided to use" "
as in" ".repeat()
. It was frustrating trying to figure out why the answer was not accepted.;-)
Could you please tell me where abouts the code needs fixing, the line number?
I'm happy to make changes. Thanks.
Is there anything else I can do?
Thanks.
I have deleted the commented out text in solution and tests.
Thanks.
Why don't you just delete the outdated part instead of commenting them out? They're already obsolete so there's no reason to keep them.
Loading more items...