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.
What's the point of having the number type be
long long
in C++?My solution was
O(N^3)
space complexity and still passed.During studying always wanted to write code, that finds Matrix Determinant. My dream came true =)
Determinant stays the same after matrix transposition (i.e. row vector matrix would produce the same determinant as column vector one).
how do I solve the random tests? Its the last thing I have to do
Nice kata. Took me too long to solve but I need to make my solution more performanant instead of copying arrays.
Random test might be broken for java, all other test for me are working including independent tests I tried.
I thought I would finish this in 1 or 2 hours, and I just saw the sunset while I was doing it...
Not a kata issue. Or maybe it is, but we can never tell with so little information. Closing.
approved
Excellent kata, I enjoyed learning about determinants and solving this. Took me too long to realise I wasn't multiplying the sub determinant by the anchor for 4x4 + matrices.
You can technically do what you're trying to do without division; your intention is to cancel out numbers, and you can either do that by division as you're doing, or by multiplication (hint: maybe
std::lcm
can help?). Haven't tried it out, but you should probably be able to find an approach that works without float division.Don't think that way. You'll get quicker the more higher rank Katas you solve. The fact that you solved it now means you'll solve similar Katas much quicker. That's how it works for everyone; people program quickly when they've seen enough problems of that sort.
How long should it take to solve this Kata?
It took me 5 hours, is it too long?
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?
alternatively you could mod by 1e9 + 7. https://www.geeksforgeeks.org/modulo-1097-1000000007/
Loading more items...