Maximum Element in an Array
EasyArraySearchIteration
### Description
Write a function that takes an array of integers and returns the maximum element in the array.
### Constraints
- The array will contain at least one element.
- Array length ≤ 10^5
- Each element: -10^6 ≤ value ≤ 10^6
### Example
Input: [1,5,3,9,2]
Output: 9
Examples
Example 1
Input: [3,1,8,4,5]
Output: 8
Example 2
Input: [-5,-1,-10]
Output: -1