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.
Anyone can review my code? I tried don't using numpy lib for this task, and I want receive information, why my code is bad in performance level and readability code.
You can see which "modules" (usually called Gems in ruby, I think) are installed for ruby on codewars here, although I don't think this list is complete.
You can also run
puts Gem::Specification.all().map{|g| g.name}in the trainer to print a list of installed gems. These are the gems that are available on codewars and you cannot install more on codewars.(Ruby) Where do you get data of modules like "Matrix"? I ended up writing Gaussian Elimination Algorithm from scratch, not knowing that. I'm now using only Ruby Documentation.
This comment is hidden because it contains spoiler information about the solution
Thought I'll add a time complexity analysis since I couldn't find one posted here(or maybe I've missed it):
If we assume T(n) is the time complexity for solving the problem of size n(n * n matrix), we have the following recursion:
T(n) = n * (T(n-1) + n^2)
Basically we have n problems of size n-1 and also n^2 to construct the matrix for each sub problem.
Expanding the above we have:
T(n) = n * T(n-1) + n^3
which gives us
T(n) = n^n
What do you guys think?
This comment is hidden because it contains spoiler information about the solution
Thanks
I did
consoleto track the test #, and also to see your code's output.You are failing on the fixed test
assert.isTrue(determinant(m7)===88)where your code returns
-88instead of88.I hope that helps!
Ups. I am sorry, but it seems I cannot format it to make it more readable...
Great kata, maybe try to mention the rules of (+ - + -) when having a chain of determinates in the details.
This comment is hidden because it contains spoiler information about the solution
Pretty good Kata! Thanks to author!
Good job, it always feels amazing to finally reach a goal that you set yourself ages ago
I forgot too, but thankfully I realised after reading the formula a couple times
I'm proud of myself for actually solving the problem instead of depending on libraries to do it for me
Loading more items...