Problem
Input format
The first line of input contains the natural number `n`. The second line contains the `n` elements, separated by spaces. - `1 <= n <= 50` - Array elements are integers with absolute value at most `1.000.000`. - The solution must use recursion.
Output format
The program prints a single integer: the maximum value in the array, followed by a newline.
Example
5 3 1 4 1 5
5
Stuck?
Use the Get Hint button in the action bar to reveal a guided hint.
💬 Discussion
Loading...No comments yet. Be the first to start the discussion!
Sample cases (from the problem)
Sample Case 1
5 3 1 4 1 5
5
Solve it your way first
Community solutions unlock after you submit a passing solution. Don't peek.
Ready to solve this challenge?
Create a free account to write code, submit solutions, and track your progress.