Data-Structures-and-Algorithms
Data-Structures-and-Algorithms copied to clipboard
Add monotonic stack demo with correct output order
This PR adds two functions demonstrating monotonic decreasing and increasing stacks in C++.
- Ensures correct output order using forward iteration
- Dry-run verified with input {3, 4, 5, 6, 7, 4, 5, 3}
- Useful for understanding stack-based filtering and skyline compression
Ready for review and integration.