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.
Very nice solution, but I don't prefer use regex and replace because for long string is not very good for performance
Thanks for your help. In fact, I had assumed that there were only three 3D points..
See if this link is any helpful: https://docs.codewars.com/training/training-example#debugging-a-kata
When I press the ATTEMPT button, the random test begins. How can I print the input there?
As far as I can see, your current code only works for 3 points. If you print the input, you'll see that sometimes your function is given less or more than that.
Thanks Chrono 79. But I still don't understand.
I got this output:
...
Result mismatch - Expected: [-0.82, 0.75, 0.35], instead got: [-2.72, 2.51, 1.18]
Test Passed: Value deep equals [-1.54, -0.6, 0.64]
Result mismatch - Expected: [-1.33, -0.5, -0.29], instead got: [-2.22, -0.84, -0.48]
Test Passed: Value deep equals [-0.77, -0.82, -0.75]
Result mismatch - Expected: [-0.31, -0.93, 0.06], instead got: [-0.93, -2.8, 0.19]
...
This is very strange to me! Can you explain a possible reason, please?
Print the input to help you debug your code, already told you what the problem is.
This comment is hidden because it contains spoiler information about the solution
You assume the amount of points passed to your function is always the same. Not a kata issue.
We do not know what your solution is, so we do not know how to fix it. Sorry.
Hello guys!
I wrote the function in Javascript, but a strange thing happened.
The random test passes, but in random tests some pass and others don't and I don't understand why.
I checked with one my colleague and it's very strange for him too.
What can I do?
A thousand thanks.