1. Check when the stack is not empty -> Check wheather any element in stack is greater than current elemnt 2. In this process the stack might go empty , else you can end up with finding a greater element 3. If the stack is empty keep -1 at that location 4. if the stcak is not empty keep peek element ========================================