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.
You did not initialize a container to perform the accumulation within. The
reduce
function basically does nothing, you should instead compute the total frequencies using an Object / Map.Hi Xenophis, thanks for spending your time on this kata. I hope it will be a learnfull experience.
If you have your shape classes implemented (all with the correct area calculations) the aim is to implement a customized 'sort' on your classes by overriding the standard 'sort'. Example of 'sort' in C#: myShapeCollection.Sort(). In Java: Collections.sort(myShapeCollection).
Your customized 'sort' should be on area size. You can find on the internet how to override the default sort method on a collection in the language of preferrence.
I don't know JS, but don't forget to mark your comment next time as "spoiler" and put your code in a code block (between
```
s) to make it more readable.You can't compare strings in Java with
==
and!=
. Usestring1.equals(string2)
.