"Nearest Smaller Element" in reversed order


#1

I have used the same trick as “Nearest Smaller Element” on the reversed array.
Is there a better solution?