diff --git a/C++/largest-rectangle-in-histogram.cpp b/C++/largest-rectangle-in-histogram.cpp new file mode 100644 index 0000000..58bb447 --- /dev/null +++ b/C++/largest-rectangle-in-histogram.cpp @@ -0,0 +1,36 @@ +// Name: Sumit Chakraborty + +// Username: chakraborty9569 + +class Solution { +public: + int largestRectangleArea(vector& heights) { + stack s; + int max_area=0; + int tp; + int area_with_tp; + int i=0; + while(i