id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

meanAverage


Return the average of the values, except ignoring the largest and smallest values in the array. If there are multiple copies of the smallest value, ignore just one copy, and likewise for the largest value. Use integer division to produce the final average. You may assume that the array is length 3 or more.


meanAverage([1, 2, 3, 4, 100]) → 3
meanAverage([1, 1, 5, 5, 10, 8, 7]) → 5
meanAverage([-10, -4, -2, -4, -2, 0]) → -3

...Save, Compile, Run (ctrl-enter)

public int meanAverage(int[] nums) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 18

Copyright Nick Parlante 2017 - privacy