Design Stack with O(1) findMax()
Filed under Yatra.com
The question
Design a stack data structure that supports retrieving the maximum element in O(1) time.
No write-up yet. Related questions below have one.
Related Yatra.com questions
Collected from public candidate posts and coding forums. Updated Nov 2026.