Daily challenge for 2026-04-13
468. Track Maximum Stack Value
You are given a list of operations to perform on an initially empty stack. The operations are either "PUSH x" (where x is an integer) or "POP". After each operation, record the maximum value currently in the stack. If the stack is empty, record -1. Return the list of recorded maximums.
Example:Input: ops = ["PUSH 3", "PUSH 5", "POP", "POP"]Output: [3, 5, 3, -1]
Run this challenge interactively in Python or JavaScript when the app loads.