← Citrix questions

Max Element in Stack

Filed under Citrix · Also reported at Delhivery

The question

Given an infinite stream of numbers with push/pop operations, return the largest element in the stack at any point in O(1) time and O(N) space.

No write-up yet. Related questions below have one.

Related Citrix questions

Collected from public candidate posts and coding forums. Updated Nov 2026.