Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Grader.class is a regular java class, please run it with Run Java Application NOT JUnit. Create a program named RunningGroups.java and implements the following static
Grader.class is a regular java class, please run it with "Run Java Application" NOT JUnit. Create a program named RunningGroups.java and implements the following static method: public static int runningGroups (String inputFileName) throws IOException this method returns the number of running groups public static int[] runningGroups (String[.] inputFileNames) throws IOException it returns an int array, each element in the array represents the number of running groups for its corresponding input file. Then test your program. Here is the problem description: There are N (1 =0) and speed (>0) of each runner. Both numbers (starting position and speed) are at most 1 billion. All runners start at different positions, and these (starting position) will be given in increasing order in the input. SAMPLE INPUT: 5 0 1 1 2 2 3 3 2 6 1 The number of running group: 2 Grader.class is a regular java class, please run it with "Run Java Application" NOT JUnit. Create a program named RunningGroups.java and implements the following static method: public static int runningGroups (String inputFileName) throws IOException this method returns the number of running groups public static int[] runningGroups (String[.] inputFileNames) throws IOException it returns an int array, each element in the array represents the number of running groups for its corresponding input file. Then test your program. Here is the problem description: There are N (1 =0) and speed (>0) of each runner. Both numbers (starting position and speed) are at most 1 billion. All runners start at different positions, and these (starting position) will be given in increasing order in the input. SAMPLE INPUT: 5 0 1 1 2 2 3 3 2 6 1 The number of running group: 2
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