Question doubt hint

hi,
please give hint on on the problem Find the greater element ( 1st problem on stack queue challenges)
thanks

@vatsal50
refer method 2 in this
(https://www.geeksforgeeks.org/next-greater-element/)