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.
I compared the execution with my solution and both produced same result. Mine is a lot compact & implies recursion.
Fantastic work!, Mine has almost the same procedures as yours, but too manuel.
I knew I needed recursion; I wasn't able to transform my function into a recursive one.
So, thank you.
The kata does not assume the input matrix has an LU decomposition. Note that determining whether a square matrix has an LU decomposition is non-trivial, so either there should be handling if LU decomposition doesn't exist, or all inputs should guarantee to have one.
Modifying input will break the tests.
This comment is hidden because it contains spoiler information about the solution
Incorrect test framework usage in JS:
return Test.expect(isLowerTriangular(l, "L should be lower triangular"));
should beTest.expect(isLowerTriangular(l), "L should be lower triangular");
.Typo:
Missing random tests.
incredible solution. really cool.
Check the comments, this solution is at least 5 years old, and probably there were no random tests when it passed. Read Eldrad's comment below to see why it fails. Solutions automatic revalidation isn't working and this solution is invalid (as you could see) with random negative tests.
How can this pass? I tried to test run and it fails the random tests.
Damn nice. I took way too long to solve this and this looks so simple
The tests are working correctly. Your code must be causing this.
Even shorter and clearer:
(a, b) => a[0]-b[0] || a[1]-b[1]
Thanks, i completed it myself with else if statements and recursion, i knew there must be nicer way :)
Loading more items...