a) Describe, using English, an algorithm for finding the largest integer in a list of n integers.________________b) Express this algorithm in pseudocode.________________c) How many comparisons does the algorithm use?
Solution: Step 1 :In this problem we have using english to explain an algorithm for finding the largest integer in a list of n integers.Step 2 : (a) :* first step we have to set the temporary maximum equal to the first integer in the sequence.* The temporary maximum will be the largest integer examined at any stage of the program.* Next we have to compare the next integer in the sequence to the temporary maximum.* And then set the temporary maximum equal to this integer.* Repeat above all steps if there are more integers in the sequence. * Otherwise stop when there are no integers left in the sequence.* The temporary maximum at this point is the largest integer in the sequence.