First, let's assume that this is a set of integers that you want to find the maximum of:
Set
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 the position of the maximum number in the Set. By definition, a Set is an unordered group of numbers. So any order that the Set returns (say, by the Set's iterator) will be arbitrary.
design an algorithm for finding all the factors of a positive integer
yea me too dude. Mahleko :(
Design an algorithm to show the different operations on a stack?
Design an algorithm to show the different operation on the degree.
Design step by steps algorithm on how to write the letter A and display the result
top-down design
1. Design an algorithm to compute sum of the squares of n numbers?
Divide and conquer is computer science. It is an important algorithm design.
It appears that algorithm design is a part of having a DSP engineering job. To find out what exactly a DSP engineer may have to do, visit http://www.careerbuilder.com/jobs/keyword/dsp+engineer
hai this web site very useful senthil
The formula, as far as I can see, is not appropriate for the algorithm.
maximum obtainable output