2275. Largest Combination With Bitwise AND Greater Than Zero | Leetcode Daily (POTD) 6 Nov 2024

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

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

  • @heyRay81194
    @heyRay81194 16 วันที่ผ่านมา +1

    nice explaination 👏

  • @NikhilRaj-ox6lr
    @NikhilRaj-ox6lr 17 วันที่ผ่านมา +3

    as few of uuh are getting problem so i can explain a lil
    10^7=10,000,000 in decimal.
    Binary Representation of 10,000,000: Converting 10,000,000 to binary, we get =100110001001011010000000
    This binary representation has 24 bits.
    so we have to iterate each bit(from 1st bit till 24th) of respective element to check how many of them contain 1 at that particular bit position
    and then have to return the highest of them

  • @Astro-Coder
    @Astro-Coder 17 วันที่ผ่านมา +3

    Straight forward But you should have explained - why you iterated 24 time
    i know that given constraint is n

    • @algorithmsbyaditi
      @algorithmsbyaditi  17 วันที่ผ่านมา

      Will improve, Thanks!

    • @vishnu62040
      @vishnu62040 17 วันที่ผ่านมา +1

      You can iterate over 32bits but that doesn't make sense to iterate over 0's as per the constraints. Infact you can go more above it as per constraints given in problem.

  • @harishbehera7812
    @harishbehera7812 17 วันที่ผ่านมา +1

    thank you for the video. Radhe Radhe

  • @thecodecrafted
    @thecodecrafted 17 วันที่ผ่านมา +2

    i

  • @crekso398
    @crekso398 17 วันที่ผ่านมา +1

    thank you so much maam

  • @codewith_me07
    @codewith_me07 17 วันที่ผ่านมา +1

    Your explanation is very well 😊

  • @satyasanjay1339
    @satyasanjay1339 17 วันที่ผ่านมา +1

    *With this simple formula, you can find how many bits are required to represent a number. This is for Java, you will find something similar in other languages.*
    int noOfBits = (int)(Math.log(num)/Math.log(2)) + 1;

  • @denver3174
    @denver3174 17 วันที่ผ่านมา +1

    really awesome explanation mam

    • @algorithmsbyaditi
      @algorithmsbyaditi  17 วันที่ผ่านมา

      Thanks! Glad you found it helpful.

  • @bhartirana6387
    @bhartirana6387 17 วันที่ผ่านมา +2

    hello mam, i really appreciate your efforts but this question i really did not understand, how you made combination and their value assumed i want to know how it is done, and how the answer is 4, could you please clear my doubt?

    • @NikhilRaj-ox6lr
      @NikhilRaj-ox6lr 17 วันที่ผ่านมา +3

      Decimal Value:
      10^7=10,000,000 in decimal.
      Binary Representation of 10,000,000: Converting 10,000,000 to binary, we get =100110001001011010000000
      This binary representation has 24 bits.
      so we have to iterate each bit(from 1st bit till 24th) of respective element to check how many of them contain 1 at that particular bit position.
      and then have to return the highest of them

    • @algorithmsbyaditi
      @algorithmsbyaditi  17 วันที่ผ่านมา

      Great work!

  • @poojapansare4071
    @poojapansare4071 17 วันที่ผ่านมา +1

    You didnt put much efforts for this video plz make it clear and put actual values instead of assuming it... re-upload this video

    • @algorithmsbyaditi
      @algorithmsbyaditi  17 วันที่ผ่านมา

      Thanks for your feedback, I'll keep it in mind for future videos!

  • @sankalpbarriar1029
    @sankalpbarriar1029 17 วันที่ผ่านมา +3

    Poor explanation

  • @AmitKumar-cp1oz
    @AmitKumar-cp1oz 17 วันที่ผ่านมา +1

    Not Clear enough, Please put more effort in your videos!

    • @algorithmsbyaditi
      @algorithmsbyaditi  17 วันที่ผ่านมา

      I appreciate the feedback, I'll try to make my explanations clearer in the future.