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.
Yeah I don't think a performance optimization should ever trump a higher level approach without a significant advantage being in play. Write code at the highest level of abstraction available to you unless a compelling reason exists to go lower level.
I think it's interesting that solutions marked with the highest 'clever' score are also coming up with the highest 'best practice' score. Those should, in most cases, be inverted.
Recursion is clever but difficult to reason and computationally more expensive. It's loved for its mathematical purity; it's the most clever.
Iteration is both faster and easier to reason; making almost always a best practice.
Great work! I give this marks for cleverness, as we do so love recursive solutions in comp sci.
That said, recursive solutions are rarely the easiest to reason about and, while repleat with mathematical brilliance, computationally the most expensive.
For that reason, I cannot mark best practice on a recursive solution when the iterative solution is almost the same size and is easier to reason for others.
Still, neato!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The php tests are considerabily lacking, as the one test neither does what the author says, nor provides a single common case for the situation.
Further, the minimum PHP version for solutions should be set to 7.1 now. 5x is dead. 7.0 is dead. 7.1 is old. 7.2 is old-current. 7.3 is current.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution