Question: ( a ) Remove rows where at least a given fraction f of the values are negative ( b ) Replace negatives in
a Remove rows where at least a given fraction of the values are negative
b Replace negatives in each of the remaining rows with average value of nonnegative greater than
or equal to numbers in the same column; if there are no nonnegative values in the column,
replace it with
As an example, if we are given the following array :
Step a will produce the following if the given fraction :
Step b will produce the following:
You are given a starter Java file where you need to complete the code in the functions
extract and replace which correspond to the steps a and b
You are encouraged to test with other examples.
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
