Sponsored
Use these hints if you're stuck. Try solving on your own first.
Iterate on nodes in reversed order.
When iterating in reversed order, save the maximum value that was passed before.
Solve with full IDE support and test cases