Amazon SDE Challenge - April/ May 2022
Cricket Training Program
Cricket training program
Bob is the coach of a cricket team and he has N players each having a training capacity of A, He also has M trainers with training capacity 6 which can train players for their better performance Any trainer can train only one player and one player can take training from only one trainer. Bob wants the maximum number of players from his team to get training from trainers But the players can only take training from the trainer if the trainer’s training capacity B,(1SISM) is less than or equal to the training capacity of that player A.
Task
Determine the maximum number of players who can take training if trainers are assigned optimally.
Notes
- There can multiple players or trainers with the same training capacities.
- You have to output only the count of players who can get training from trainers.
1 |
|