← back to unit
Easy
# stacks easy
How Tall Did It Get?
The block tower rose and fell all afternoon — what was its proudest moment? 🧱
You get commands (add:x or take, takes always valid). Print the TALLEST the pile ever got.
Example:
Input: commands = ["add:a", "add:b", "take", "add:c", "add:d", "add:e", "take"]
Output: 4
Tracking height after every command: 1, 2, 1, 2, 3, 4, 3 — the tallest the pile ever reaches is 4.
💡 need a hint?
stk-how-tall.py🔒 given lines are locked — write your code in between
loading...