Answered step by step
Verified Expert Solution
Link Copied!

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([55,7,-8]) should return 7
insensitiveAverage([7,33,1,19]) should return 13
Starter code and tests have been provided for you

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases In Networked Information Systems 6th International Workshop Dnis 2010 Aizu Wakamatsu Japan March 2010 Proceedings Lncs 5999

Authors: Shinji Kikuchi ,Shelly Sachdeva ,Subhash Bhalla

2010th Edition

3642120377, 978-3642120374

More Books

Students also viewed these Databases questions

Question

What is one major advantage of using PowerBI?

Answered: 1 week ago

Question

=+What is the most that you should pay to complete development?

Answered: 1 week ago

Question

=+development and make the product, should you go ahead and do so?

Answered: 1 week ago