Max Stack
Learn Max Stack (Stack, Data Structures & Algorithms) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Max Stack - Same Idea as Min Stack, Mirrored Identical to Min Stack, just tracking the MAXIMUM instead of the minimum: a second stack mirrors the main one, always holding "the largest value seen so far at this depth".