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.
Great solution!
I'm confused with how your solution works,
isn't it that in case of 13 the value returned will be 11?
if you only want one statement run after the condition, the curly braces is not necessary
you dont need the curly braces??
The answer is correct.
Yes, Team 4 and Team 5 have same GD=-2 amd P=1.
No, they are not equal ranked because Team 4 scored 3 goals and Team 5 scored 0 goals.
assertArrayEquals(new int[]{2,3,4,1,5,6},
LeagueOrder.computeRanks(6, new int[][]
{{0, 5, 2, 0},
{1, 4, 2, 2},
{2, 3, 1, 3},
{1, 5, 0, 0},
{2, 0, 2, 1},
{3, 4, 3, 1}}));
I think the teams rank 5 and rank 6 have same rank 5 cuz both of them are: GD:-2 && P: 1