A Football Scores The number of goals achieved by two football teams in matches in a league is given in the form of two lists. Consider: • Football team A, has played three matches, and has scored ( 1,2,3)hoals in each match respectively. • Football team B, has played two matches, and has scored ( 2, 4 ) goals in each match respectively. Your task is to compute, for each match of team B, the total number of matches of team A, where team A has scored less than or equal to the numba that match. In the above case • For 2 goals scored by team B in its first match, team A has 2 matches with scores 1 and 2. • For 4 goals scored by team B in its second match, team A has 3 matches with scores 1, 2 and 3. Hence, the answer: (2, 3). Function Description Complete the function counts in the editor below. The function must return an array of m positive integers, one for each maxes/ representing the tot satistying nums s maxes[i) where O sj

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

foot ball score alogirthm in java!!

A Football Scores
The number of goals achieved by two football teams in matches in a league is given in the form of two lists. Consider.
• Football team A, has played three matches, and has scored (1,2,3)goals in each match respectively.
• Football team B, has played two matches, and has scored ( 2, 4 ) goals in each match respectively.
Your task is to compute, for each match of team B, the total number of matches of team A, where team A has scored less than or equal to the number of goals
that match.
In the above case:
• For 2 goals scored by team B in its first match, team A has 2 matches with scores 1 and 2.
• For 4 goals scored by team B in its second match, team A has 3 matches with scores 1, 2 and 3.
Hence, the answer: (2, 3).
Function Description
Complete the function counts in the editor below. The function must return an array of m positive integers, one for each maxes( representing the total number
satistying nums s maxes[i) where 0 sj<n and 0si<m, in the given order.
counts has the following parameter(s):
nums[nums/0].nums(n- 1): first array of positive integers
maxes(maxes/0).maxes/n-1: second array of positive integers
Constraints
• 2sn, m s 10
•1 s numsj) s 10, where 0sj<n.
• 1s maxesfi) s 10', where 0 si < m.
Input Format For Custom Testing
ws and nasserd to the function
Transcribed Image Text:A Football Scores The number of goals achieved by two football teams in matches in a league is given in the form of two lists. Consider. • Football team A, has played three matches, and has scored (1,2,3)goals in each match respectively. • Football team B, has played two matches, and has scored ( 2, 4 ) goals in each match respectively. Your task is to compute, for each match of team B, the total number of matches of team A, where team A has scored less than or equal to the number of goals that match. In the above case: • For 2 goals scored by team B in its first match, team A has 2 matches with scores 1 and 2. • For 4 goals scored by team B in its second match, team A has 3 matches with scores 1, 2 and 3. Hence, the answer: (2, 3). Function Description Complete the function counts in the editor below. The function must return an array of m positive integers, one for each maxes( representing the total number satistying nums s maxes[i) where 0 sj<n and 0si<m, in the given order. counts has the following parameter(s): nums[nums/0].nums(n- 1): first array of positive integers maxes(maxes/0).maxes/n-1: second array of positive integers Constraints • 2sn, m s 10 •1 s numsj) s 10, where 0sj<n. • 1s maxesfi) s 10', where 0 si < m. Input Format For Custom Testing ws and nasserd to the function
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY