You are given two integer arrays, scores and ages, of identical length, where scores[i] and ages[i] represent the score and age of the
You wish to choose a team that achieves the maximum possible total score. A conflict arises if a younger player has a strictly higher score than an older player. No conflict exists between players who share the same age.
Return the highest overall score achievable by choosing a valid team with no conflicts.
Constraints:
scores.length, ages.length
scores.length ages.length
scores[i]
ages[i]
You are given two integer arrays, scores and ages, of identical length, where scores[i] and ages[i] represent the score and age of the
You wish to choose a team that achieves the maximum possible total score. A conflict arises if a younger player has a strictly higher score than an older player. No conflict exists between players who share the same age.
Return the highest overall score achievable by choosing a valid team with no conflicts.
Constraints:
scores.length, ages.length
scores.length ages.length
scores[i]
ages[i]