Maximum Rectangular Area in a Histogram | Stacks | Love Babbar DSA Sheet | Amazon🔥

Sdílet
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

Komentáře • 24

  • @harshitverma6026
    @harshitverma6026 Před 3 lety +3

    Content Quality Complexity : O(2^N) 💗

  • @vinayppandey4321
    @vinayppandey4321 Před 2 lety +1

    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👍👍👍👍

  • @mohdarish4195
    @mohdarish4195 Před 11 měsíci

    Awesome bro 💞

  • @harshitavyas7497
    @harshitavyas7497 Před 2 lety

    this is a variation of kadene algorithm and can be done more efficiently through it!

  • @souravnaik6355
    @souravnaik6355 Před 2 lety

    Great explanation !!

  • @tusharnain6652
    @tusharnain6652 Před 2 lety

    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;
    }

  • @priyanshsahu2641
    @priyanshsahu2641 Před 3 lety +3

    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

    • @tekbssync5727
      @tekbssync5727 Před 2 lety +2

      Bhai ye bc itna easy question hai , phir bhi iska video dekhne par mujhe paseena aa jata hai .....😅 Aditya Verma is the best

    • @tusharnain6652
      @tusharnain6652 Před 2 lety

      Well, i think you need to see Next Greater Element as a pre requisite for this video, then you can understand this one.

  • @nikhilsingh3928
    @nikhilsingh3928 Před 2 lety

    Please explain the width .It's very confusion.

  • @madhurajput452
    @madhurajput452 Před 2 lety +1

    Can you please send me love babber's dsa sheet...

    • @ramit1411
      @ramit1411 Před 2 lety

      drive.google.com/file/d/1FMdN_OCfOI0iAeDlqswCiC2DZzD4nPsb/view

  • @therealhustlerSG
    @therealhustlerSG Před 3 lety

    Can u plz help me to solve my coding contest question

  • @Zunan263
    @Zunan263 Před 2 lety

    Bhut time lfa samajneme

  • @bihariboyzyt826
    @bihariboyzyt826 Před 3 lety

    Hi bro

  • @aishwaryaporwal2321
    @aishwaryaporwal2321 Před 3 lety +2

    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

    • @CodeLibrary
      @CodeLibrary  Před 3 lety +2

      In initial stage it happens with everyone....so don't get depressed and keep practicing in consistent way.....One day you will surely succeed.

    • @aishwaryaporwal2321
      @aishwaryaporwal2321 Před 3 lety

      @@CodeLibrary will do it surely thanks

    • @india_wants_to_know4396
      @india_wants_to_know4396 Před 2 lety +1

      @@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 🥺

  • @geetshaala2405
    @geetshaala2405 Před rokem

    bhai esa samjhaya ki dubara kabhi iski video na dekhu..

  • @amitgupta-or5nm
    @amitgupta-or5nm Před rokem

    ab to ksi aur ki explanation smjh ni ati 🤣🤣🤣🤣🤣