Describe an algorithm for finding both the largest and the smallest integers in a finite sequence of integers.

Step 1:

In this problem, we need to describe an algorithm for finding the largest and the smallest integers in a finite sequence of integers.