Write two algorithms to find both the smallest and largestnumbers in a list of n numbers.
In first algorithm, you simply write one loop to find the minimumand maximum. So there will be 2(n - 1) comparisons.
In second algorithm, you try to find a method that does at most1.5n comparisons of array items.
Determine the largest list size (i.e., n) that Algorithm 1 canprocess and still compute the answer within 60 seconds. Report howlong it takes Algorithm 2 to compute this answer.