Challenge: Finding the Top 3 Hardest-Working Employees
Compito
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
workersin ascending order by the number ofhoursWorkedusing thecomparingInt()method. - Reverse the list of
workersto make it descending by the number ofhoursWorkedusing thereversed()method. - Select the top three workers with the highest
hoursWorkedusing thelimit()method. - Print each of these three workers to the console.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 25
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Fantastico!
Completion tasso migliorato a 2.33
Challenge: Finding the Top 3 Hardest-Working Employees
Scorri per mostrare il menu
Compito
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
workersin ascending order by the number ofhoursWorkedusing thecomparingInt()method. - Reverse the list of
workersto make it descending by the number ofhoursWorkedusing thereversed()method. - Select the top three workers with the highest
hoursWorkedusing thelimit()method. - Print each of these three workers to the console.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 25
single