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.
Forked and approved
Resolved MC
Scrutinized tests
Added useful assertion messages
Added input and returned types
Removed reference solution and used a completely different one from OP's
Added corresponding headers to be compatible with PHPUnit 9.5.2
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Super readable. This is really nice.
Arrow functions are not IIFE. This is just their syntax. If they are one line expressions they don't need return. But if they contain several lines of code, then they need return statement and curly braces around code block.
Does this work without the return statement because arrow functions are 'immediately invoked functions?'
no need to spend an iteration reversing
Fixed this
Missing
<?php
tagsI like this solution just for readability!
Approved
Loading more items...