Question: with this methods complete this table Size of input array MaxPairwiseProduct1withNumSteps MaxPairwiseProduct2withNumSteps 3 10 50 100 200 500 1000 public static int MaxPairwise Product1withNum Steps(int[]

 with this methods complete this table Size of input array MaxPairwiseProduct1withNumSteps

MaxPairwiseProduct2withNumSteps 3 10 50 100 200 500 1000 public static int MaxPairwise

with this methods complete this table

Size of input array

MaxPairwiseProduct1withNumSteps

MaxPairwiseProduct2withNumSteps

3

10

50

100

200

500

1000

public static int MaxPairwise Product1withNum Steps(int[] A) { int numSteps = 0; // we declare and initialize our number of steps. int maxProduct = 0; numSteps++; // for the declaration of maxProduct as a step numSteps+=2; // for the declaration of i and checking the condition i maxProduct if (A[i]*A[] > maxProduct) { maxProduct = A[i]*AD); numSteps++; // for the update of maxProduct } numSteps += 2; // for the update of j checking the condition j A[indexMax] if (A[i] > A[indexMax]) { indexMax = i; numSteps++; // for the update of indexMax } numSteps += 2; // for the update of i and checking the condition i A[indexMax]) if (i != indexMax && A[i] > A[indexMax2]) { indexMax2 = 1; numSteps++; // for the update of indexMax } numSteps += 2; // for the update of i and checking the condition i AindexMax]) is not public static int[] costMaxPairwise Product10 { // one int per cost, one average cost per size (3, 10, 50, 100, 200, 500, 1000) int[] sizes = {3, 10, 50, 100, 200, 500, 1000); int[] averages = new int[7]; for (int i=0; i maxProduct if (A[i]*A[] > maxProduct) { maxProduct = A[i]*AD); numSteps++; // for the update of maxProduct } numSteps += 2; // for the update of j checking the condition j A[indexMax] if (A[i] > A[indexMax]) { indexMax = i; numSteps++; // for the update of indexMax } numSteps += 2; // for the update of i and checking the condition i A[indexMax]) if (i != indexMax && A[i] > A[indexMax2]) { indexMax2 = 1; numSteps++; // for the update of indexMax } numSteps += 2; // for the update of i and checking the condition i AindexMax]) is not public static int[] costMaxPairwise Product10 { // one int per cost, one average cost per size (3, 10, 50, 100, 200, 500, 1000) int[] sizes = {3, 10, 50, 100, 200, 500, 1000); int[] averages = new int[7]; for (int i=0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!