Problem of Find The Greater Element

What is .peek function used in the solution of question “Find The Greater”

@dheerajmishra992,
Are you talking about stack.peek? If so, it will return the element at the top of the Stack else returns NULL if the Stack is empty.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.