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.
how do I solve the random tests? Its the last thing I have to do
When using a faster approach that requires working with floating point numbers, the results on large matrices are either off by 1, or miss completely. How can I fix that?
Fun kata! But I have a question why in C# all kata seems to uses jagged arrays instead of multidimensional? (int[][] this instead of int[,]). I am genuinely curious because it seems to me more appropriate a multidimensional array in this case and in many others that I found... am I wrong?
Should probably make it clear that the matrix is being represented by row vectors (alternative would be column vector). One can assume that and infer that from the examples but it really is the kind of info that should be in the instructions.
This comment is hidden because it contains spoiler information about the solution
I completed this kata but the randomHardTest is broken for C#. At first I was receiving an overflow during summation in the determinant calculation, so I refactored to work with 64 bit ints, which fixed this problem, but the result was failing the randomHardTest with unexpected results. On closer inspection, the expected values of the test are not the real determinant values, they are the same as the 64-bit results, truncated to 32-bit. An explicit cast of my final 64-bit result allowed me to pass all tests.
How I am supposed to give recursive function my deducted matrix by not copying? Is there a trick to do that?
I get this error message although my code works correctly on vs:
UndefinedBehaviorSanitizer:DEADLYSIGNAL ==1==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000008 (pc 0x000000425762 bp 0x000000000000 sp 0x7ffd80757280 T1) ==1==The signal is caused by a READ memory access. ==1==Hint: address points to the zero page. ==1==WARNING: invalid path to external symbolizer! ==1==WARNING: Failed to use and restart external symbolizer! #0 0x425761 (/workspace/test+0x425761) #1 0x42597b (/workspace/test+0x42597b) #2 0x4286a4 (/workspace/test+0x4286a4) #3 0x426cfe (/workspace/test+0x426cfe) #4 0x426843 (/workspace/test+0x426843) #5 0x42647b (/workspace/test+0x42647b) #6 0x42f045 (/workspace/test+0x42f045) #7 0x425b2d (/workspace/test+0x425b2d) #8 0x7fdd659bfbf6 (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6) #9 0x404709 (/workspace/test+0x404709)
UndefinedBehaviorSanitizer can not provide additional info. ==1==ABORTING
C# RandomTestHard is broken.
Please check the initial array and expected result. Other tests are passed => the problem is in specific test. Math is an exact science.
This comment is hidden because it contains spoiler information about the solution
Just so I stop wasting my time, I use float precision and return i64, are tests in rust precise?
My program is working but tests are failling by 1 or 10-12 for large determinants.
D translation
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
[C#] [Tests]
RandomTests and RandomTestsHard do not have correct expected values, even may use nonsquare matrices!!
For example:
RandomTests
0 7 -6 9 -6 4 -2 10 7
7 8 -10 -10 4 -8 8 -10 -5
-8 2 -4 -6 3 -3 4 2 4
3 -9 1 -2 -9 -7 4 -8 9
-1 3 1 -6 8 -8 7 -6 -4
6 2 7 0 8 7 -9 -3 4
3 -5 -7 7 -6 2 -10 6 8
-4 -2 6 7 -4 2 -6 -1 -3
5 9 5 -7 -3 -1 -9 9 10
Expected: 758396961
But was: 9348331553
Loading more items...