Maximum Rectangular Area in a Histogram | Stacks | Love Babbar DSA Sheet | Amazon🔥
Vložit
- čas přidán 7. 09. 2024
- #stacks #queues #stackqueue #competitiveprogramming #coding #dsa
Hey, Guys in this video I have explained how we can solve the problem 'Maximum Rectangular Area in a Histogram'.
Join our Telegram Channel for more Information
🔰 Telegram Channel Link = t.me/CodeLibrary1
🔰 Telegram Discussion Group Link = t.me/CodeLibra...
--------------------------------------------------------------------------------
Unacademy Links--
Use my code "YOGESH" to access all FREE classes and get a 10% Discount on Paid Courses.
Career as a Developer: unacademy.com/...
Beat the Odds with Arsh Goyal: unacademy.com/...
--------------------------------------------------------------------------------
🔰 Array Playlist = • Love Babbar DSA 450 Qu...
🔰 String Playlist = • Love Babbar DSA 450 Qu...
🔰 Searching and Sorting Playlist = • Love Babbar DSA 450 Qu...
🔰 Binary Tree Playlist = • Love Babbar DSA 450 Qu...
🔰 Linked List Playlist = • Love Babbar DSA 450 Qu...
🔰 Graph Playlist = • Love Babbar DSA 450 Qu...
🔰 Dynamic Programming Playlist = • Love Babbar DSA 450 Qu...
🔰 Informative Videos = • Informative Videos
🔰 Love Babbar DSA Sheet: drive.google.c...
Follow us on Instagram:
🔰 Shailesh Yogendra : / shaileshyogendra
🔰 Yogesh Yogendra : / i_am_yogesh_here
Follow us on LinkedIn:
🔰 Yogesh Yogendra : / yogesh-yogendra-26bbb518a
🔰 Shailesh Yogendra : / shailesh-yogendra-8b13...
Hope you like it. Comment if you have any doubt
LIKE | SHARE | SUBSCRIBE
Content Quality Complexity : O(2^N) 💗
LOL, idk how to react, happy or sad.
Nice content broo....keep doing like this...And don't never let the hard work that u put in the video and content quality of the videos down bcz of an unacademy platform where u teach....bcz we the the audience of yours have faith on u👍👍👍👍
Awesome bro 💞
this is a variation of kadene algorithm and can be done more efficiently through it!
Great explanation !!
same approach with lesser code --->
int largestRectangleArea(const vector &arr)
{
int n = arr.size();
int max_area = INT_MIN;
stack s;
int i = 0;
for (int i = 0; i < n; i++)
{
while (!s.empty() && (i == n || arr[s.top()] > arr[i]))
{
int length = arr[s.top()];
s.pop();
int width = s.empty() ? i : i - s.top() - 1;
int this_area = length * width;
max_area = max(max_area, this_area);
}
s.push(i);
}
return max_area;
}
bhai yha thik se samjha easy way mein ya tu rhene de maine literally 10 baar video dekhi socha ab samj aagjayga lekn bhai kuch nhi aaya pls bro easy trah se samjha DSA se jyaada teri video samjhne mein dikkat hoti hai
Bhai ye bc itna easy question hai , phir bhi iska video dekhne par mujhe paseena aa jata hai .....😅 Aditya Verma is the best
Well, i think you need to see Next Greater Element as a pre requisite for this video, then you can understand this one.
Please explain the width .It's very confusion.
Can you please send me love babber's dsa sheet...
drive.google.com/file/d/1FMdN_OCfOI0iAeDlqswCiC2DZzD4nPsb/view
Can u plz help me to solve my coding contest question
Bhut time lfa samajneme
Hi bro
Hi 😊
Like I really want to ask u something???
Actually mai bi tier-3 cllg student hu and rn in 3rd year and following love babbar dsa sheet.
Mujhe sai easy level question toh ho rhe pr medium level questions kuch kuch nhi bna rhe h and it's very depressing some time so mujhe yah puchna h ki yah sab ke sath hota h yah mera logic building weak is lia mere sath ho rha h and how can I improve it more n more ....am doing dsa for the first time
In initial stage it happens with everyone....so don't get depressed and keep practicing in consistent way.....One day you will surely succeed.
@@CodeLibrary will do it surely thanks
@@aishwaryaporwal2321 i m facing the same problem I m also in third year Sometimes I even not Able to find brute force approach of some questions 🥺
bhai esa samjhaya ki dubara kabhi iski video na dekhu..
ab to ksi aur ki explanation smjh ni ati 🤣🤣🤣🤣🤣