Maximal square | Dynamic programming | Leetcode

This video explains a very important dynamic programming question which is the maximal square problem from leetcode #221. This has frequently been asked in interviews. In this problem, you are required to find the largest square formed by a binary matrix and the square should have all 1s in it. We need to return the area of the largest square matrix as our answer. This problem can be solved by depth first search, recursion and backtracking but they will consume a lot of time and so i have shown the intuitive approach to solve this problem by dynamic programming. I have shown the solution using proper examples to develop intuition for DP. CODE LINK is given below. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)
CODE LINK: gist.github.com/SuryaPratapK/...

Пікірлер: 225

  • @quirkyquester
    @quirkyquester3 жыл бұрын

    "im not sure if you can understand this" and "I hope you are understanding this" haha, love these two quotes haha lol

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    😅

  • @pl5778
    @pl57783 жыл бұрын

    this is probably the best visual explanation i've seen thus far. This is really excellent, the ability to break it down with such simplicity. Subscribed.

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Thanks :)

  • @Corona0715

    @Corona0715

    2 жыл бұрын

    Unbelievable 😌😌 Subscribed :)

  • @charlesbickham6604
    @charlesbickham66044 жыл бұрын

    Man I dont how you get answers like this! Been doing the leetcode 30 day challenge with you. Love your way of thinking and understanding! Would love for you to do a video of when to use different approaches like backtracking, sliding window etc!

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    I will do it soon bro....

  • @alperozdamar517
    @alperozdamar5174 жыл бұрын

    Marvelous solution! I love DP programming and your thought process. Thank you.

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Welcome :)

  • @quirkyquester
    @quirkyquester3 жыл бұрын

    amazing explanation, thank you! I love how you walk us through your thought process and assume that we don't know what you are talking about.

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Yep I can't assume everyone to understand me completely 😅

  • @ploratran
    @ploratran2 жыл бұрын

    Thank you this is the easiest explanation I've found so far on the internet for this problem.

  • @mondayemmanuel191
    @mondayemmanuel1913 жыл бұрын

    You've been a great help in my learning of DSA. Thank you.

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Welcome :)

  • @rishabhpathak9916
    @rishabhpathak99164 жыл бұрын

    The way u explain with examples and all sorts of intutions, helps a lot to understand complex algorithms and codes. Yhank you so much

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Thanks bro :)

  • @parthshah6343
    @parthshah63434 жыл бұрын

    I have seen your previous videos too, you are one of the best when it comes to explaining solutions!

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Thanks :)

  • @amitavamozumder73
    @amitavamozumder733 жыл бұрын

    this was so simple, but finding a rectangle was so complicated, we literally converted that to a histogram for each row and calculated that. wish there was a simple dp like this for that problem.

  • @hanieharabzadeh4185
    @hanieharabzadeh41854 жыл бұрын

    This channel deserves more subscription. You explained very well . Thanks a lot!

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Welcome :)

  • @sumitanglekar6309
    @sumitanglekar63094 жыл бұрын

    The Best Explanation of DP. Made it look so easy at the end !!

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Thanks :)

  • @khan.mansoor
    @khan.mansoor3 жыл бұрын

    So underrated but such a useful video with very clear explanation. I was able to solve a related problem after watching the video halfway. Thank you so much.

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Welcome :)

  • @dragonindian1
    @dragonindian13 жыл бұрын

    You are doing awesome job, i have refered other video where people just memorize and repeat, you understand and explain things. Very helpful. Keep doing the good work.

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Thanks bro :)

  • @robinofautumn99
    @robinofautumn993 ай бұрын

    Thankyou for such an amazing video!!

  • @ankitkumaryadav562
    @ankitkumaryadav5623 жыл бұрын

    Nice Explanation you are doing great job.................:)

  • @SujeetKumar-hh5jz
    @SujeetKumar-hh5jz3 жыл бұрын

    Even beginners can understand DP , the way you explain is soo good.

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Thanks

  • @ronitdhingra4395
    @ronitdhingra4395 Жыл бұрын

    As always...the best explanation available on youtube.....Thanks a lot surya... TechDose, helping us learn DS and get jobs since 2019:)

  • @vivekswami2182
    @vivekswami2182 Жыл бұрын

    Love the explanation man !!

  • @ankurgupta4696
    @ankurgupta46964 жыл бұрын

    thanks a lot for explaning such a hard problem in a easy way:)

  • @alokbhowmik3547
    @alokbhowmik35472 жыл бұрын

    Awesome explain bror 👍👍

  • @mrinalraj7166
    @mrinalraj71664 жыл бұрын

    Hi TechDose, Congratulations on making such a beautiful video. You always succeed in making a deeper dive into the concept behind a solution.

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Thanks :)

  • @SexyAnvesha
    @SexyAnvesha3 жыл бұрын

    You simplified the problem, very well explained. thanks!!

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Welcome :)

  • @nehasomani3446
    @nehasomani34462 жыл бұрын

    Really good explanation!! Thanks a lot!

  • @amityanarayan8808
    @amityanarayan88082 жыл бұрын

    Awesome thanks! By far a detailed explanation. Subscribed for more.

  • @techdose4u

    @techdose4u

    2 жыл бұрын

    Welcome 😄

  • @kitkarson4226
    @kitkarson42263 жыл бұрын

    I was super confused how to solve the problem. You gave me a nice hint. Thanks.

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Welcome

  • @testtest674
    @testtest674 Жыл бұрын

    hi , please could you tell me how to find the indexes where the square matrix begins ?

  • @savy9554
    @savy95542 жыл бұрын

    Amazinggg sir 🙏🏻

  • @shahjaysheeldipalbhai207
    @shahjaysheeldipalbhai207 Жыл бұрын

    excellent explanation

  • @sahilanand30
    @sahilanand302 жыл бұрын

    Best explanation 🔥

  • @kanishkagupta5801
    @kanishkagupta58014 жыл бұрын

    This type of approaches are far beyond our thought. How to proceed for this kinda questions?

  • @evgeni-nabokov

    @evgeni-nabokov

    4 жыл бұрын

    Practice, practice, sis... Train your sense of determining the problem is solved by applying DP (1 dimension or 2 dimensions, or even more), and then follow some formal steps: what is a sub problem, what is recurrent formula, what are the initial values, which way to fill the table where is the answer in the table.

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    You will need a lot of practice to identify solution for these questions :)

  • @Siva-lx9dw

    @Siva-lx9dw

    3 жыл бұрын

    @@techdose4u how to practice??

  • @toksdotdev

    @toksdotdev

    3 жыл бұрын

    @@Siva-lx9dw Solve more questions and explore different solutions to a problem. Before solving a problem, you can try to come up with a solution (especially when your interview is far away). Also, once you see a solution to a problem, don't just move on. Analyze why the solution works the way it, and compare it to how you were approaching the problem in the first place (even though you never arrived at the solution). Analyze the data structures used, and question why that specific data structure was used, and if you could solve it with an alternate data structure. In summary, analyze solutions, and ask your self why it works the way it works. Try to code the implementation (this is also one way to learn deeply why a solution works).

  • @rahulreddy7484
    @rahulreddy74844 жыл бұрын

    No words to appreciate ur xplaination.

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Thanks :)

  • @aakashparmar3999
    @aakashparmar39992 жыл бұрын

    What a great explanation!!

  • @saitejam3769
    @saitejam3769 Жыл бұрын

    Such a great programmer and the way of explanation is very nice we want more videos like this. sir try to make videos on recursion.

  • @rahulchudasama9363
    @rahulchudasama93633 жыл бұрын

    Nice explaination ...

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Thanks

  • @bulb_blub
    @bulb_blub Жыл бұрын

    Your videos have been helping me out a lot. Just wanted to say thanks

  • @techdose4u

    @techdose4u

    Жыл бұрын

    Welcome :)

  • @neelsoni13062
    @neelsoni13062 Жыл бұрын

    Amzing Sir.

  • @avikmallick2493
    @avikmallick24933 жыл бұрын

    Tech dose has become my daily dose

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    ❤️

  • @mohammadumaidansari6617
    @mohammadumaidansari66173 жыл бұрын

    Clear Explanation ! 👌👨‍💻

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Thanks :)

  • @shivatrivedi6964
    @shivatrivedi69642 жыл бұрын

    u r amazing.....thnku

  • @francesn7715
    @francesn77153 жыл бұрын

    You make the best explanation videos for leetcode, hands down. Please make a video for #31 Next Permutation

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Thanks. I will try to make it soon :)

  • @Official-tk3nc
    @Official-tk3nc4 жыл бұрын

    Great explanation brother proud to be an indian:)

  • @Usurperhk
    @Usurperhk3 жыл бұрын

    Best explanation of the problem. Hat's OFF......

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Thanks

  • @saunaknandi1814
    @saunaknandi1814 Жыл бұрын

    so talented bruhh

  • @indsonusharma
    @indsonusharma4 жыл бұрын

    Ye pyaar nhi toh aur kya hai ! Amazing video bro 👌

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Thanks :)

  • @shyamprakashm6325
    @shyamprakashm63254 жыл бұрын

    Thanking you bro ..it is very much helpful to me in the views of placement ..keep posting bro..😍😍😍😍

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Sure will keep posting :)

  • @adarshagrawal5858
    @adarshagrawal58583 жыл бұрын

    Good Problem hard to think !!

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Sure is :)

  • @Paunitza
    @Paunitza3 жыл бұрын

    Very good explanation. Thank you!

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Welcome :)

  • @biharichawal5412
    @biharichawal54122 жыл бұрын

    Thanks for help with this question, your explainations are really good

  • @techdose4u

    @techdose4u

    2 жыл бұрын

    Thanks 😊

  • @hussainrangwala1078
    @hussainrangwala10783 жыл бұрын

    Very well explained. Thanks!!

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Welcome

  • @pixlphotography5982
    @pixlphotography59822 жыл бұрын

    can u explain why we take min from three directions??

  • @TP-xt4sv
    @TP-xt4sv3 жыл бұрын

    excellent.

  • @JamesHalpert8555
    @JamesHalpert85554 жыл бұрын

    Very nice explanation!!! Thank you!!

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Thanks bro :)

  • @akashskumar99
    @akashskumar992 жыл бұрын

    great job; but u could have done it with just m*n dp instead of m+1*n+1 dp by hard coding top row and left column as default values of original matrix avoiding confusion

  • @aviligondagowtham1153
    @aviligondagowtham11534 жыл бұрын

    Sir can u tell more problems on dynamic programming concepts bcz so many placement questions asked on this basis

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    I will make a separate video on common patterns in dynamic programming questions. This will help you figure out the approach more in depth.

  • @ankitpaul723

    @ankitpaul723

    3 жыл бұрын

    @@techdose4u Thanks! waiting for that video!

  • @clairekowalsky4913

    @clairekowalsky4913

    3 жыл бұрын

    Hi, @TECH DOSE Were you able to make this video? Sorry for pestering you, but it would be really helpful if someone could provide a link to this if he has made it.

  • @techwills4619
    @techwills46193 жыл бұрын

    I had some hard time fully understanding the DP approach so I managed to come up with another way to solve it in O(Nrows * Ncols) time and O(Ncols) space. The idea is to reuse what we learned with largest rectangle of 1s in a matrix. Once we get a histogram, just look for a square with side equal to (1 + current maximum side). I may make a video of it on my channel

  • @aayushpagare9366
    @aayushpagare936610 ай бұрын

    Amazing

  • @shantanujoshi3863
    @shantanujoshi38632 жыл бұрын

    Awesome

  • @prakhyat2001
    @prakhyat200111 ай бұрын

    GOD Level explanation

  • @sakthim7160
    @sakthim71604 жыл бұрын

    Clean and clear explanation!

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Thanks :)

  • @paragroy5359
    @paragroy53593 жыл бұрын

    Nice explanation sir...you are doing a great job

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Thanks

  • @pramodkumarramasani5327
    @pramodkumarramasani53273 жыл бұрын

    Great explanation

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Thanks

  • @ace-xxx
    @ace-xxx4 жыл бұрын

    you explain every problem very nicely.......can you please make a series of important questions for placement.

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    I have already told that questions which you find on interviewbits are already sorted in order of importance. I will make my own set of problems once I get my website running. But it will not be soon. So, I suggest you to start interviewbits

  • @piyushdasila6129
    @piyushdasila6129 Жыл бұрын

    good explanation!!!

  • @techdose4u

    @techdose4u

    Жыл бұрын

    Thanks

  • @ankitghosh9873
    @ankitghosh98732 жыл бұрын

    wowwwww what an explanation!!!!!!!!!

  • @techdose4u

    @techdose4u

    2 жыл бұрын

    Thanks ☺️

  • @sase1017
    @sase10174 жыл бұрын

    very good and detailed solution, thanks

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Thanks

  • @rahulvutukuri9254
    @rahulvutukuri92543 жыл бұрын

    please do provide lnks for JAVA solutions if possible, you are doing great job Thanks

  • @SFsachin
    @SFsachin4 жыл бұрын

    Lit🔥🔥 great video!

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Thanks buddy :)

  • @codingwithanonymous890
    @codingwithanonymous8902 жыл бұрын

    Sir how to do recursiveky

  • @sagarsingh-wb8ou
    @sagarsingh-wb8ou2 жыл бұрын

    Hi , Can someone explain in first way how he is using dfs??

  • @akashtyagi7182
    @akashtyagi71824 жыл бұрын

    Crisp and clear explanation. Thanks ! All of your videos are of great help. If you would like I can contribute to Python solutions of your videos. Github repo will be a good idea.

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Nice .....I will create one....

  • @rohitkumar2984
    @rohitkumar29844 жыл бұрын

    1st row and 1st column is not necessary in dynamic 2d array. We can take a 2d dp array of same size as input and fill it's 1st row and 1 column separately by the elements same as present in input array and then we can follow the same approach as mentioned in the video to fill other rows and columns.

  • @singhsaab7121
    @singhsaab71212 жыл бұрын

    Why we just checked dp [i-1][j-1] == 1 and not other two cells in if condition?

  • @jpnr8
    @jpnr83 жыл бұрын

    awesome bro!

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Thanks

  • @hoyinli7462
    @hoyinli74622 жыл бұрын

    great diagrams!

  • @techdose4u

    @techdose4u

    2 жыл бұрын

    Thanks

  • @anshularora2073
    @anshularora20733 жыл бұрын

    best explanation... thankyou

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Welcome

  • @chris.w391
    @chris.w3913 жыл бұрын

    Nice explain, thanks!

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Welcome :)

  • @adityarathi3420
    @adityarathi34203 жыл бұрын

    Thanks sir :-)

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Welcome

  • @backslash8874
    @backslash88744 жыл бұрын

    Awesome explanation. I don't know how can anyone dislike it.

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Thanks :)

  • @financewithsom485
    @financewithsom4854 жыл бұрын

    Mind blowing approch

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Thanks :)

  • @MrDheeraj14
    @MrDheeraj143 жыл бұрын

    very well explained!

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Thanks

  • @akhilak2084
    @akhilak20844 жыл бұрын

    Now I knew when I saw the question that it's got something to do with DP. But I froze at the thought of coding a DP solution. What do you recommend to practice in/read for getting more confident?

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Both reading and practice will help. But the imp thing is to notice dp patterns, where to use and where not to. Observing is important.

  • @akhilak2084

    @akhilak2084

    4 жыл бұрын

    Thank you sir 😊

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Welcome :)

  • @bhavyanayyer3391
    @bhavyanayyer33912 жыл бұрын

    sir pls check this solution not working in interviewbit

  • @yitingg7942
    @yitingg79423 жыл бұрын

    Wow, thank you so much Sir ! I can understand it lol..

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Welcome :)

  • @yitingg7942

    @yitingg7942

    3 жыл бұрын

    @@techdose4u I found out that for a problem if I watched your video, I can remember the solution for a Longgg time, if watch other's video I will forget the solution the next day. 😂

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    @@yitingg7942 keep watching our videos ❤️

  • @designandcraft
    @designandcraft4 жыл бұрын

    very helpful video...

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    🤣

  • @spetsnaz_2

    @spetsnaz_2

    4 жыл бұрын

    @@techdose4u 😂😂

  • @harshalgarg1149
    @harshalgarg11493 жыл бұрын

    Thanks.

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Welcome

  • @one_minute_iitian_ai
    @one_minute_iitian_ai4 жыл бұрын

    Hi Sir, Your explanation is crystal clear. 😊 Can you please tell me the name of Recording application? I tried to Google but didn't find any recorder as good as this. Reply reply 😊

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Camtasia

  • @madhvansharma5917
    @madhvansharma59173 жыл бұрын

    Hi, I don't think we needed a dp matrix of size [n+1]*[n+1]. I think dp[n][n] would have worked. BTW love your videos :)

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    Take whatever works :)

  • @spetsnaz_2
    @spetsnaz_24 жыл бұрын

    I tried solving this problem using DFS and got TLE on last 3 test cases on LEETCODE as you said, but got accepted in GEEKSFORGEEKS 😜

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    😅

  • @crimsoncad3230

    @crimsoncad3230

    4 жыл бұрын

    How did you solve using DFS???

  • @spetsnaz_2

    @spetsnaz_2

    4 жыл бұрын

    @@crimsoncad3230 I just checked if encountered 1, then dfs from that location and incresed the count diagonally and check whether all are 1s in that square here is my code bool isSafe(int i, int j, vector grid){ if(i= grid.size() or j= grid[i].size()) return 0; return 1; } int dfs(int i, int j, int count, vector grid){ //check diagonal right is 1 or not if(!isSafe(i+1, j+1, grid)){ return count*count; } //then check for max size of square formed for(int k=0; k ans ? curr : ans; } } } return ans; }

  • @aayushpagare9366

    @aayushpagare9366

    3 жыл бұрын

    should have memoized then

  • @tanishqgupta1071
    @tanishqgupta10714 жыл бұрын

    Nice explanation 🙂

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Thanks :)

  • @rajesh1341
    @rajesh13414 жыл бұрын

    Thank you. your video helped me solved the problem. But I feel I am lacking so much more. Can anyone please tell me how do I improve dynamic programming problems? Can you recommend any resources? These DP problems are lowering my confidence day by day.

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Don't be down. It's just a matter a time when you pick them. DP is always tricky 😅

  • @rajesh1341

    @rajesh1341

    4 жыл бұрын

    @@techdose4u Thanks for kind words :) I started leetcode with "30 days challenge" only. out of 26 problems I was able to solve only 16. Remaining times, I had to look for explanations and understand and submit. So I was looking for help if I need to prepare and understand something, before answering leetcode solutions. Bytheway your explanation is so crisp than many other foreigner leetcode videos. They directly jump to code.

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    I don't find meaning in explaining code. The important thing is how you thought about that process. Practice is always good. 16 is better than 15. You did well. You will only improve from here on. So don't stop. Keep practicing :)

  • @oyeshpatel8791
    @oyeshpatel87914 жыл бұрын

    Which would you suggest to learn dp?

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Pardon? I think you want to know what to learn. Keep practicing dp questions. As you practice, keep searching about each and reason for a step. In this way, you will learn dp.

  • @MakrandPatil17
    @MakrandPatil173 жыл бұрын

    Why are you checking dp [i-1][j-1] == 1 in if condition ??

  • @saptarshidas488

    @saptarshidas488

    3 жыл бұрын

    Diagonal adjacent cell is being checked here

  • @SHASHANKRUSTAGII
    @SHASHANKRUSTAGII3 жыл бұрын

    dp is very beautiful

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    :)

  • @hritikagarwal7676
    @hritikagarwal76763 жыл бұрын

    what is the intuition behind using "min" in these elements?

  • @saptarshidas488

    @saptarshidas488

    3 жыл бұрын

    The idea is to check if there are occurrences of 0s in any of the past adjacent cells. Say you are currently at i = 3, j = 4 of the above example. If you take min of past adjacent cells, and it comes out as 0 then it means that a 2×2 square matrix CANNOT be formed. If you have min as 1 that means 3×3 matrix of 1s cannot be formed, here only a 2×2 is possible.

  • @vrushabh_kulye7060
    @vrushabh_kulye70604 жыл бұрын

    i also solved this question by dp, it seems easy for me...still i watch your all videos to get better understanding 😄😄

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    Nice :)

  • @sudhamahajan2272
    @sudhamahajan22723 жыл бұрын

    what if we had to find rectangle instead of square??

  • @saptarshidas488

    @saptarshidas488

    3 жыл бұрын

    Well, a rectangle can be thought of as combination of 2 or more squares in the matrix. So we have to find continuous ccurrences of 2s or 3s or any higher number in a row of this DP matrix. We may take a counter "c" initialised to the first occurrence of a number >=2 in each row. And then increment it by one as an when we find more continuous occurrences of that number in the same row. We compute the area of a possible rectangle in each row traversal and store this value in a max variable. The area can be calculated as: counter × largest

  • @bitrish34
    @bitrish343 жыл бұрын

    🔥🔥

  • @techdose4u

    @techdose4u

    3 жыл бұрын

    👍

  • @rajeshbammidy180
    @rajeshbammidy1804 жыл бұрын

    I think we can do it like the way we solve "Largest square in a histogram"

  • @rishabhshukla5719

    @rishabhshukla5719

    3 жыл бұрын

    How?

  • @rajeshbammidy180

    @rajeshbammidy180

    3 жыл бұрын

    @@rishabhshukla5719 If you are aware of finding largest rectangle in a binary matrix you can apply the same logic(with some changes ofc)

  • @Analogue-India
    @Analogue-India4 жыл бұрын

    Please sir, make a video on problem Game of two stacks of hackerrank

  • @techdose4u

    @techdose4u

    4 жыл бұрын

    I have added this problem in my already long todo list. Will make it as soon as I get time for sure.

  • @Analogue-India

    @Analogue-India

    4 жыл бұрын

    @@techdose4u Thank you sir