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.
zhiburt are you checking for am empty array? I just passed with GoLang.
Hey I also run into such an issue.
I did reset it didn't help.
I am confident to say that it's not an issue in my code.
Also I can state that the issue is not determenistic.
For example I've got an error on such data
[][]int{{165, 526}, {510, 397}}
.I created my own test with it and it works.
BTW: thanks for a great kata
You need to reset the trainer (doing so will erase your solution, so you should copy it beforehand).
Thank you for the effort but the error still persists. Does it maybe take some time for the correction to be approved? :)
The translator ignored the part of the description saying that
0x0
matrix is equivalent to[[]]
... Fixed.I have the same problem.
Investigating from side, I conclude the same thing.
Hope they will correct it
whenever i try to do any operation on the 2d vector like .size() this error appears, i just don't know cause every thing is fine on my compiler (i used the same function provided here)
UndefinedBehaviorSanitizer:DEADLYSIGNAL
==1==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0xfffffffffffffffc (pc 0x000000425576 bp 0x000000000004 sp 0x7fff0e55f210 T1)
==1==The signal is caused by a READ memory access.
==1==WARNING: invalid path to external symbolizer!
==1==WARNING: Failed to use and restart external symbolizer!
#0 0x425575 (/workspace/test+0x425575)
#1 0x428826 (/workspace/test+0x428826)
#2 0x42696e (/workspace/test+0x42696e)
#3 0x4264f8 (/workspace/test+0x4264f8)
#4 0x4260cb (/workspace/test+0x4260cb)
#5 0x42be15 (/workspace/test+0x42be15)
#6 0x4257ed (/workspace/test+0x4257ed)
#7 0x7f14d85a0b96 (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#8 0x404489 (/workspace/test+0x404489)
UndefinedBehaviorSanitizer can not provide additional info.
==1==ABORTING
There's an issue with C++ empty matrix test
the compiler isn't detecting this case
if(snail_map[0].size()==0)
return ans;
where ans is an empty vector
My code is working on visual studio on empty matrix or any matrix
In the Golang translation, all of the tests pass quickly apart from the random test. On my machine, the test completes successfully on that random dataset and the last digits of the answer form the correct spiral in the middle of the test data. However, on here, the output is "runtime error: index out of range"
Edit: After extensive testing with panics and print outs, I'm pretty sure the "runtime error: index out of range" error is in the code for the random tests. Can someone please correct it
Decent, but I've seen better