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.
Like @crunker99 said above, it's worth noting that this evaluates the expression for every single day. Fine in this case because they're all very cheap, but something to keep in mind.
This comment is hidden because it contains spoiler information about the solution
always forget about this...
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
That's your point of view. Some could say it's to find an easy to maintain production-like piece of code. Others may want to play code golf and find the shortest possible solution. Others to find the most efficient one.
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.
Loading more items...