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.
This comment is hidden because it contains spoiler information about the solution
everyone seems to ahve used cramers rule. much simpler than gaussian and numerically and complexity wise fine for 2x2 system
Quadratic equations are very useful
This comment is hidden because it contains spoiler information about the solution
til about if expressions
Look at it carefully...its not a special lambda syntax. Its just normal arithmetic and logical expressions
oh wait, this is not a lambda, just normal arithmetic/logicla expressions...clever
I love lambdas
I love how you overrode the function definition itself.
Yeah basically did the last byte savings with lambda, though didn't do math tricks
Yeah its nice to see implementations not following the naive O(n!) approach
You used a scipy library function for LU factoring. I just directly implemented the Gaussian elimination, O(n^3). The LU implementation probably also does the same.
Gaussian elimination is probably overkill for the problem sizes here, but it avoids the irritation of copying submatrices for the determinant minors. And for practical size matrices its O(n^3) performance is tablestakes compared to the O(n!) naive approach.
The point of these puzzles is to practice the implementation
This one times out for me. I had to add a test to break the loop when the new term equals 0.0
Holy mother of god, I hope you generated the program via another program