Let’s say I have an array:
a = [1,4,3,6,4]
I want to get an array where for every element I have the largest value of a to the right (inclusive). That is for a I would want to create an array:
[1,3,3,4,4]
Is there a quick, concise way to do this?