2D Prefix Sum Interview Pattern | 221 Maximal Square

Last problem on Prefix Sum Interview Pattern!
This one uses Binary Search on Answer as well.
Link: leetcode.com/problems/maximal...
Connect with me on Linkedin: / bharat-khanna-717b4817b
Connect on Insta: / bharatkhanna1995
00:00-01:40 Problem Introduction
01:41-04:20 Brute Force
04:21-10:30 Prefix Sum for O(N^3)
10:31-14:21 Binary Search on Answer
14:22-21:18 Code

Пікірлер: 10

  • @____Akash__
    @____Akash__4 ай бұрын

    Great Explanation!!

  • @CodingwithBharat

    @CodingwithBharat

    4 ай бұрын

    Thanks ✌️

  • @vyomgoyal3125
    @vyomgoyal31254 ай бұрын

    Nice explanation bhaiya !!!!

  • @CodingwithBharat

    @CodingwithBharat

    4 ай бұрын

    Thanks 😁

  • @chetan.s.bandurkar2690
    @chetan.s.bandurkar26904 ай бұрын

    Nice Video keep it up Bhaiya

  • @CodingwithBharat

    @CodingwithBharat

    4 ай бұрын

    Thanks ✌️

  • @fomoCoder69
    @fomoCoder694 ай бұрын

    this was surely not a medium question :P BS on answers + prefixSum

  • @CodingwithBharat

    @CodingwithBharat

    4 ай бұрын

    There is a dp solution as well which is more straightforward but with these concepts - yes, a tough one!

  • @dayashankarlakhotia4943
    @dayashankarlakhotia49434 ай бұрын

    public int maximalSquare (char[][]matrix){ int m=matrix.length,n=matrix[0].length; int[]dp=new int[n]; maxLen=0,prev=0; for(int i=0;i

  • @CodingwithBharat

    @CodingwithBharat

    4 ай бұрын

    Yup that exists too. But doesn’t use our pattern :)

Келесі