Answered step by step
Verified Expert Solution
Question
1 Approved Answer
n this exercise, you are computing the average of an array of integers. However, averages are statistically sensitive to outliers ( very large or very
n this exercise, you are computing the average of an array of integers. However, averages are statistically sensitive to outliers very large or very small values relative to the others in the array Therefore, this problem asks you to throw out both the largest and the smallest values that exist in the array when computing the average. If there are multiple copies of the largest or smallest values, you should only throw out one of those. You are guaranteed that there will be at least three elements in the parameter array. Your function should return the integer average using integer division. We'll call this function insensitiveAverage
For example:
insensitiveAverage should return
insensitiveAverage should return
Starter code and tests have been provided for you
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started