Find the Largest Element
Easyjavapythonccppjavascript
Given an array of N integers, find the largest element present in the array.
Input Format
The first line contains an integer N. The second line contains N space-separated integers.
Output Format
Print a single integer — the largest element of the array.
Example 1
Input
5 4 7 2 9 5
Output
9
Explanation: Among all elements, 9 is the largest.
- 1 <= N <= 100000
- -1000000000 <= A[i] <= 1000000000