Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
hey bros,remember that int_max has 10digit; that is to say ,if one number is >999999999,then it is the FFFFirst longest number
My answer is to look for a largest number in the array, in my view ,the largest number always has the longest digit;
and my algorithm are as follows
int max =0;
int digit =0;
for(int x=0;x<array.length;x++){
if(Math.abs(array[x])>x){
max = Math.abs(array[x]);
digit =x;
}}
return array[digit];//since there may be negative number ,so I'm just looking for the index
but I meet problem with the random test,< expected 1709606145,but was -2143483761>.
emm,when I come to this sentence ,I get to know why I am wrong. may be 1709606145 is in the front of the second.I feel very sorry.