Given a number N followed by N elements for every 2 consecutive numbers print the maximum of the 2.
Input Size : N <= 100000 (ie do it in O(n) time complexity)
Sample Testcase :
INPUT
5
1 1 3 0 5
OUTPUT
1 3 3 5
Comments
(2)
Please login to comment.