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.
well, this is the best solution. The only thing is now we know kyu should be related to languages ! :)
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 is wrong. $yourPoint should be pushed to $classPoints in order to calculate correct average.
Edit: Ok, not necessary to pass.
Technicaly, the requirement didnt say EXPLICITLY that we could not use built-in function so there is a gray area. So despite this aproach is not "handmade from scracth" is also valid acording the kata definition.
Your code doesn't pass test
$this->assertEquals(true, betterThanAverage([2, 3], 3));
But you not included your points for the average.
Edit:
I see another comment that its the same :)
I write my code in a complicated way because I didnt know simpler function.
this is the benefit of practices, you learn what you dont know and it will be added to your experiences.
а чё всмысле
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
PHP is strong :)
The LHS does not use the
reverse
method.Loading more items...