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.
lol nice, at least it works for the test cases
This comment is hidden because it contains spoiler information about the solution
$this->check(basicOp('/', 4, 0), 0);
Division by zero :(
Sorry but this is not best practices. Sure it looks pretty with it being only a few lines of code but it's O(n^2) whereas my solution is O(n).
Let n = 10000;
Runtime for this solution ~= 0.0433 seconds
Runtime for my solution ~= 0.0017 seconds
Let n = 100000;
Runtime for this solution ~= 4.8142 seconds
Runtime for my solution ~= 0.0169 seconds
Let n = 1000000;
Runtime for this solution == Fails (out of memory after running locally for over 15 minutes)
Runtime for my solution ~= 0.1612 seconds