Solución
solution.tsTypeScript
public class Solution {
public Integer max(int[] numbers) {
if (numbers.length == 0){
return null;
}
int max = numbers[0];
for (int n: numbers){
if (n > max){
max = n;
}
}
return max;
}
}
0respuestas