3209. Number of Subarrays With AND Value of K | Leetcode Biweekly 134

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ก.ย. 2024

ความคิดเห็น • 16

  • @aryansharma9200
    @aryansharma9200 2 หลายเดือนก่อน

    amazing explaination

  • @selvaragavan_10
    @selvaragavan_10 15 วันที่ผ่านมา

    Bro great please change the color of your cursor. It is not visible when seen from mobile.

  • @nabajyotimajumdar4511
    @nabajyotimajumdar4511 2 หลายเดือนก่อน

    awesome!

  • @sanjai_rs7
    @sanjai_rs7 2 หลายเดือนก่อน

    Hello Sir, Can you post a couple of videos on how to prove greedy solutions for some good problems or if you already have posted in your channel can you share the link or problem name. I am facing difficulty in Greedy Problems.

  • @sanchitkumar6626
    @sanchitkumar6626 หลายเดือนก่อน

    Bhaiya come with some of greedy problem set

  • @bishwashkumarsah171
    @bishwashkumarsah171 2 หลายเดือนก่อน

    Maja agaya.

  • @HindiDubbedReels
    @HindiDubbedReels 2 หลายเดือนก่อน +2

    Bro how you came to the conclusion that by using binary search the complexity becomes O(n*logn)??
    Because it is now even (n^2+nlogn)
    Reason:- we need to build the and array for n positions and that will take n^2 time and then binary search on each array we build
    Please use Hindi language if possible because English me hum Indians kabhi kabhi bolte kuch aur h aur kahna kuch chahte ha

    • @selvaragavan_10
      @selvaragavan_10 15 วันที่ผ่านมา

      To build the AND array it takes only O(N) times. I mean to build a segment tree.

  • @sudhadevi6692
    @sudhadevi6692 2 หลายเดือนก่อน +1

    Bhaiya some has also solve it with sliding window approach also.

    • @codingmohan
      @codingmohan  2 หลายเดือนก่อน

      The only difference is in the last part - instead of using segment trees, you can use prefix sum to compute the bitwise AND.

    • @sudhadevi6692
      @sudhadevi6692 2 หลายเดือนก่อน +1

      @@codingmohan ok
      Will try to find that approach to .
      But ur explanation was gud, I got to know the magic of segment tree 1st time.

  • @AnandKumar-kz3ls
    @AnandKumar-kz3ls 2 หลายเดือนก่อน

    thanks mohan

  • @sudhadevi6692
    @sudhadevi6692 2 หลายเดือนก่อน

    Thx 4 the video bhaiya ❤

  • @ucanhly1166
    @ucanhly1166 2 หลายเดือนก่อน

    hello can you post video about Construct String with Minimum Cost (4th problem lc weekly 405)

    • @codingmohan
      @codingmohan  2 หลายเดือนก่อน

      Here you go - th-cam.com/video/0ErpIxK9QUI/w-d-xo.html

  • @tinkuvishnu795
    @tinkuvishnu795 2 หลายเดือนก่อน

    I solved it using precomputation+ bs