Daily challenge for 2026-07-13
559. Cargo Crane Loading Dock
You are managing a cargo crane at a shipping dock. The crane processes a sequence of commands to load and unload containers. The commands are given as an array of strings. Each command is either "LOAD X" (where X is an integer container ID) or "UNLOAD" (which removes the most recently loaded container from the top of the stack). If "UNLOAD" is issued when the dock is empty, it is ignored. Return the final list of container IDs remaining on the dock from bottom to top.
Example:
Input: commands = ["LOAD 10", "LOAD 20", "UNLOAD", "LOAD 30"]
Output: [10, 30]
Run this challenge interactively in Python or JavaScript when the app loads.