Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started