Skip to content

Commit

Permalink
Update task.md
Browse files Browse the repository at this point in the history
language checked
  • Loading branch information
stephen-hero authored Dec 7, 2023
1 parent faf4f95 commit a36aa01
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Coroutines/Aggregation/task.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
This task helps you familiarize yourself with the task domain. Currently, each contributor's name is repeated
several times, once for every project they have taken part in. Implement the `aggregate()` function combining the users
so that each contributor is added only once. The `User.contributions` property should contain the total number of
contributions of the given user to _all_ the projects. The resulting list should be sorted in descending order according
several times, once for every project they have participated in. Implement the `aggregate()` function to consolidate the users
so that each contributor is listed only once. The `User.contributions` property should contain the total number of
contributions made by the given user across _all_ projects. The resulting list should be sorted in descending order according
to the number of contributions.

Open [src/tasks/Aggregation.kt](course://Coroutines/Aggregation/src/tasks/Aggregation.kt) and implement the `List<User>.aggregate()` function. Users should be sorted by the total
number of their contributions.

The corresponding test file [test/tasks/AggregationKtTest.kt](course://Coroutines/Aggregation/test/tasks/AggregationKtTest.kt) shows an example of the expected result.
The corresponding test file [test/tasks/AggregationKtTest.kt](course://Coroutines/Aggregation/test/tasks/AggregationKtTest.kt) provides an example of the expected result.

<div class="hint">

> You can jump between the source code and the test class automatically by using the [IntelliJ IDEA shortcut](https://www.jetbrains.com/help/idea/create-tests.html#test-code-navigation)
> You can seamlessly switch between the source code and the test class by using the [IntelliJ IDEA shortcut](https://www.jetbrains.com/help/idea/create-tests.html#test-code-navigation)
> &shortcut:GotoTest;
</div>

After implementing this task, the resulting list for the "kotlin" organization should be similar to the following:
After implementing this task, the resulting list for the "kotlin" organization should look similar to the following:

![The list for the "kotlin" organization](images/aggregate.png)

For a more detailed description, you can look at [this article](https://kotlinlang.org/docs/coroutines-and-channels.html#task-1)
For a more detailed description, you can refer to [this article](https://kotlinlang.org/docs/coroutines-and-channels.html#task-1)

0 comments on commit a36aa01

Please sign in to comment.