Method to find the next greater value in right
def nextGreaterInRight ( a ) : NEW_LINE INDENT right_index = [ 0 ] * len ( a ) NEW_LINE s = [ ] NEW_LINE for i in range ( len ( a ) - 1 , - 1 , - 1 ) : NEW_LINE DEDENT