Question: You are given an integer N , representing the number of matches, an integer M representing the maximum winning margin, an integer R , representing
You are given an integer N representing the number of matches, an integer M representing the maximum winning margin, an integer R representing the redaired run rate for qualification and an integer array W representing the winning margins of previous matches N played by the team. Your task is to find and retum an integer value representing the minimum number of
runs by which a team should win the last match to qualify for the playoffs. Return if qualification is not possible.
Qualifying Chances
Input Specification:
input: An integer value N representing the number of matches a team can play
in the tournament. input: An integer value M representing the maximum margin by which a team
can win in the tournament.
input: An integer value R representing the required run rate which the team must have at the end of the league stages to qualify for the playoffs.
Input: An integer array W representing the winning margin of all the matches a team has played till now in the tournament.
Output Specification:
Return an integer value representing the minimum number of runs by which a team should win the last match to qualify for the playoffs. Return if qualification is not possible.
ables
Example :
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
