I can add code for Next Greater Element - II and Largest Rectangle in Histogram Leetcode problems based on Stack Data Structure in C++.
The questions belong to Medium and Hard difficulty level on Leetcode respectively and provide a good understanding of stacks.
I can add code for Next Greater Element - II and Largest Rectangle in Histogram Leetcode problems based on Stack Data Structure in C++. The questions belong to Medium and Hard difficulty level on Leetcode respectively and provide a good understanding of stacks.
https://leetcode.com/problems/next-greater-element-ii/![image](https://user-images.githubusercontent.com/83968619/137005599-218c167a-134a-4fee-af28-6064ed011bb3.png)
https://leetcode.com/problems/largest-rectangle-in-histogram/![image](https://user-images.githubusercontent.com/83968619/137005453-e79913d1-d9e2-4172-83d0-d44e451a3764.png)