Challenge: Finding the Top 3 Hardest-Working Employees
Tehtävä
Swipe to start coding
Several employees work at the factory, and we need to identify the three hardest-working employees based on the number of hours worked.
- Sort the list of
workers
in ascending order by the number ofhoursWorked
using thecomparingInt()
method. - Reverse the list of
workers
to make it descending by the number ofhoursWorked
using thereversed()
method. - Select the top three workers with the highest
hoursWorked
using thelimit()
method. - Print each of these three workers to the console.
Ratkaisu
solution.java
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 2. Luku 10
single
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme
Awesome!
Completion rate improved to 2.33
Challenge: Finding the Top 3 Hardest-Working Employees
Pyyhkäise näyttääksesi valikon
Tehtävä
Swipe to start coding
Several employees work at the factory, and we need to identify the three hardest-working employees based on the number of hours worked.
- Sort the list of
workers
in ascending order by the number ofhoursWorked
using thecomparingInt()
method. - Reverse the list of
workers
to make it descending by the number ofhoursWorked
using thereversed()
method. - Select the top three workers with the highest
hoursWorked
using thelimit()
method. - Print each of these three workers to the console.
Ratkaisu
solution.java
Oliko kaikki selvää?
Kiitos palautteestasi!
Awesome!
Completion rate improved to 2.33Osio 2. Luku 10
single