players and trainers arrays in ascending order.i for players and j for trainers, starting at 0.matches to count the number of matches made.i is less than the length of players and j is less than the length of trainers:
players[i] is less than or equal to trainers[j], increment matches, i, and j.j only.matches.