Running Maximum
Easy · rating 1000 · Arrays
The first line contains n. The second line has n integers. Print the running maximum: for each position, the largest value seen so far. Output them space-separated.
Constraints: 1 ≤ n ≤ 105
Related problems
- Account Balance — Easy
- Best Time to Buy and Sell Stock — Easy
- Count Above Average — Easy
- Dropped Frames — Easy
- Health Bar — Easy
- Merge Two Sorted Arrays — Easy