Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[8%] Given a list of distinct positive numbers and the average or mean of those numbers, following pseudo-code is to determine whether there are more

image text in transcribed

[8\%] Given a list of distinct positive numbers and the average or mean of those numbers, following pseudo-code is to determine whether there are more numbers above the average than below. MoreAbove( list, average, N ) countAbove =0 for j=1 to N do if list [j]> average then countAbove = countAbove +1 if countAbove >N/2 then return true return false Let's take the "> as the barometer operation. What is the count for he best case, and what is the count for the worst case? Give your explanation

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

Step: 3

blur-text-image

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

Database And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

More Books

Students also viewed these Databases questions

Question

What steps should be taken to address any undesirable phenomena?

Answered: 1 week ago