Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.
public int centeredAverage(int[] nums) {
int large=0;
int small=0;
for(int n:nums){
large= Math.max(large, n);
//large=n;
}
for(int n:nums){
small= Math.min(large, n);
// small=n;
}
return (large-small);
}
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
public int centeredAverage(int[] nums) {
int large=Integer.MIN_VALUE;
int small=Integer.MAX_VALUE;
int sum=0;
for(int n:nums){
large = Math.max(large, n);
small = Math.min(small, n);
sum += n;
}
return (sum-large-small)/(nums.length-2);
}
public int centeredAverage(int[] nums) {
int large=Integer.MIN_VALUE;
int small=Integer.MAX_VALUE;
int sum=0;
for(int n:nums){
large = Math.max(large, n);
small = Math.min(small, n);
sum += n;
}
return (sum-large-small)/(nums.length-2);
}
public int centeredAverage(int[] nums) {
int large=0;
int small=0;
for(int n:nums){
large= Math.max(large, n);
//large=n;
}
for(int n:nums){
small= Math.min(large, n);
// small=n;
}
return (large-small);
}
Which is absolutely not similar.If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.