


Input: 'n' = 5, 'arr' = [1, 2, 3, 4, 5]
Output: 5
Explanation: From the array {1, 2, 3, 4, 5}, the largest element is 5.
The first line will contain a single integer 'n', the size of the array ‘arr’
The second line will contain ‘n’ integers representing the array elements.
Print the maximum of elements.
You don't need to print anything. It has already been taken care of. Just implement the given function.
We can create a temporary variable ‘temp’ and traverse the array and update the temporary variable ‘temp’ with the max of the elements.