Question: Problem 1. Given a set of N non-negative integers (all the integers are pairwise different). Let N be odd. Write a C++ program which uses

 Problem 1. Given a set of N non-negative integers (all the

Problem 1. Given a set of N non-negative integers (all the integers are pairwise different). Let N be odd. Write a C++ program which uses an array to represent the set. Implement algorithms to find the minimum, maximum and median of the numbers. The median is the number such that (N - l)/2 of the numbers are less than the median and the other (N 1)/2 numbers are larger than the median. Also determine the position in the array of the minimum, maximum and median. Consider for example the set 13,4,11,2,8,20,10). The minimum is 2, the maximum is 20 and the median is 8. The position of the median is 4 if we number the positions from 0, from left to right

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!