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.
Thanks for checking. I'm closing this issue. Regards, suic
This is a CW glitch. Your solution was tested against an old version. I've added tests for edge cases and modified the date range for random tests. Please check. Regards, suic
P.S.: If you see the same problem. Push the Reset button and try again.
From the kata description.
In this kata, 11 is not a backward read prime. It needs to be different prime from original prime.
It just doesn't work like that... There's no magic here. Maybe the last assertion text is with
nil
arrays and they don't get displayed in console (IDK how go handles that). I edited your code and it works, you just need to read what error messages tell you and react to them.As a little hint: you can replace 6
if
statements at top with 2: 1 that deals with nil values and 1 that deals with different array lengths. Good luck.You could've replied to your original question... Now there's massive wall of text, which no one likes to see :/
The problem with your code is how you're handling cases when 2 arrays are empty or when 1 array is empty and other one isn't. You should remove most of those
if
blocks at the top and rewrite them to cover all scenarios, you're almost there. (you can do that in 1 or 2 lines max)And by the way, 2 empty arrays should return true.
That test expects
false
, both in sample and final tests.Are you sure those arrays are not manipulated (before logging)? I don't really know Go, but I just solved it and tests seem fine.