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
- Merge Two Sorted Arrays — Easy
- Restock Alert — Easy
- Low Stock Alert — Easy
- Move Zeroes — Easy