













Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!














Big question: Which solution to choose?
Algorithm arrayMax(A, n): Input: An array A storing n integers. Output : The maximum element in A. currentMax A[0] for i 1 to n -1 do if currentMax < A[i] then currentMax ← A[i] return currentMax
How many operations?