Pine Labs interview question

They asked a stack implementation question for next greater element to the right in an array.

Interview Answer

Anonymous

23 Aug 2024

I knew the brute force so I just answered that in 2 mins but they wanted complete stack implementation.