Próximo elemento maior JavaScript usando pilha

next greater element in array using stack
Yawning Yacare