由买买提看人间百态

topics

全部话题 - 话题: intarrs
(共0页)
Z*****Z
发帖数: 723
1
来自主题: JobHunting版 - 一道题目
上代码。
static int findCommon(int[][] intArrs){

if(intArrs == null || intArrs.length == 0){
return -1;
}

for(int[] arr : intArrs){
if(arr == null || arr.length == 0){
return -1;
}
}

int[] pointers = new int[intArrs.length];

int ans = intArrs[0][0];

boolean found = false;
while(!found){

found = ... 阅读全帖
b******y
发帖数: 9224
2

for
I think you'd have to do a loop and get the value from the Integer array and
store the int value into the int array.
Example:
int[] intArr = new int[integerArr.length];
for (int i = 0; i < integerArr.length; i++)
{
intArr[i] = integerArr[i];
}
(共0页)