Challenge: Finding the Top 3 Hardest-Working Employees
Tarea
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.
Solución
solution.java
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 2. Capítulo 10
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Awesome!
Completion rate improved to 2.33
Challenge: Finding the Top 3 Hardest-Working Employees
Desliza para mostrar el menú
Tarea
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.
Solución
solution.java
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Awesome!
Completion rate improved to 2.33Sección 2. Capítulo 10
single