# How do you find the maximum of a set of numbers?

The maximum of a set of numbers is the largest number in the set.

### What is the definition of maximum in regards to math?

The definition of maximum in regards of math is the biggest number in the set of numbers / data. Example: If you have the numbers 10,5,8,2,60,9,3,and 1 the maximum in this set of numbers/data is 60. How? It is 60 because in the set of numbers/data it is the highest number in the set. The word maximum in maths means the most or limit.

### How do you find the maximum in a set of numbers?

Take the first number in the set and compare it against the second. If the second is higher, take that number otherwise keep the first Repeat with all the numbers in the set, comparing the highest found so far with the next number in the set, taking the higher of the two until all the numbers in the set have been checked. The number with which you remain will be the highest.

### Design an algorithm for finding the maximum in a set and position?

First, let's assume that this is a set of integers that you want to find the maximum of: Set<Integer> setOfInts; // also assume that this set is full of some ints Iterator<Integer> it = setOfInts.iterator(); int max; if(it.hasNext()) { max = it.next(); while(it.hasNext()) { int current = it.next(); if(current > max) { max = current; } } // max is now the largest number in the set } The problem comes when trying to find…

### How do you write a program to read n numbers and find the largest and smallest number?

To find the minimum (or maximum) in any set of n numbers, assume that the first number is the minimum (or maximum) and then compare it with all the remaining numbers. If any number is less than (or more than) this number, then compare the remaining numbers with that number instead. When you've compared the entire set of numbers, you will have found the minimum (or maximum) in the set. The following is an example…