Count Monotonic Stacks
Given an array of numbers, return the number of monotonic stacks, both increasing and decreasing.
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid January, 2025
Meta
Mid-level
Given an array of nums, return the number of monotonic stacks (both increasing and decreasing)
Hello Interview Premium
Your account is free and you can post anonymously if you choose.