public static int getLowestInColumnIndex(double[] [] data, int col){ double min =data (0] [col] ; int location = -1; for(int i =0; i= 0 && coldata[i] [col]) { min = data[i] [col); location = i; return location; public static int getLowestInRowIndex(double[][] data, int row) { double min = data[row] [0]; int location = 0; for(int col = 1; coldata(row] [col]) { location = col; return location;
Ok so I have been working on these two methods( I put my code in the screen shots) getLowestColumnINdex and getLowestRowIndex
1.
getLowestInColumnIndex
public static int getLowestInColumnIndex(double[][] data,
int col)
Returns the index of the smallest element of the selected column in the two dimensional array index 0 refers to the first column. If a row in the two dimensional array doesn't have this column index, it is not an error, it doesn't participate in this method
2.
getLowestInRowIndex
public static int getLowestInRowIndex(double[][] data,
int row)
Returns the index of the smallest element of the selected row in the two dimensional array index 0 refers to the first row.
![public static int getLowestInColumnIndex(double[] [] data, int col){
double min =data (0] [col] ;
int location = -1;
for(int i =0; i<data. length; i++) {
if(col>= 0 && col<data[i].length)
if(min>data[i] [col]) {
min = data[i] [col);
location = i;
return location;](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F8dba62d3-bab9-4b64-b137-060444d690d6%2Fb89e5c66-9293-483e-8109-263e98cc34df%2F0fk8rbr.png&w=3840&q=75)
![public static int getLowestInRowIndex(double[][] data, int row) {
double min = data[row] [0];
int location = 0;
for(int col = 1; col<data[row]. length; col++) {
if(min>data(row] [col]) {
location = col;
return location;](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F8dba62d3-bab9-4b64-b137-060444d690d6%2Fb89e5c66-9293-483e-8109-263e98cc34df%2Ft2qnwnd.png&w=3840&q=75)

Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images









