Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int[] Func(int[][] arr, int m, int n)
- {
- int[] result = new int[0];
- int min = arr[0][0];
- int max = min;
- int col=0;
- int row=0;
- for (int i = 0; i<m;i++)
- {
- for (int j = 0; j<m;j++)
- {
- if (arr[i][j]<min)
- col=j;
- }
- for (int x = 0; x<m;x++)
- {
- if (arr[x][col]>max)
- row=x;
- }
- if (i==row)
- result=add(result, arr[row][col]);
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement