Concepts of Bitmasking

Sdílet
Vložit
  • čas přidán 3. 06. 2021
  • This video explains all the concepts about bitmasking.I have explained how to apply bitmasking and where to use it. I have explained using intuitive examples and have also shown the code to use bitmasking and the problem to generate all possible subsets of a given set using bitmasking.Finally, I have explained the time complexity using the code for bitmasking.
    CODE LINK is present below as usual. 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 :)
    ======================================PLEASE DONATE=============================
    🧡 SUPPORT OUR WORK: / techdose
    💚 UPI-ID: surya.kahar@ybl
    💞JOIN Membership: / @techdose4u
    ==============================================================================
    INSTAGRAM : / surya.pratap.k
    LinkedIn: / surya-pratap-kahar-47b...
    WEBSITE: techdose.co.in/
    TELEGRAM Channel LINK: t.me/codewithTECHDOSE
    TELEGRAM Group LINK: t.me/joinchat/SRVOIxWR4sRIVv5...
    =======================================================================
    USEFUL LINKS:
    🟠Must do TIPS to ACE Virtual Interview: • 🔴Must do Tips to ACE y...
    🟢Best strategy to excel your coding interview: • 🔴Best strategy to exce...
    🟡Get your dream job in 1 month: • 🔴Get your dream job in...
    🔵How to crack dream job in just 2 months: • How to crack dream job...
    🟣7 Days DSA plan: techdose.co.in/7-days-dsa-che...
    RELATED LINKS:
    CODE LINK: techdose.co.in/concepts-of-bi...

Komentáře • 62

  • @ir2001
    @ir2001 Před 3 lety +33

    I'm so glad to have come across your channel. Your way of organising the content, structuring a lesson, presentation, ... that too over a seemingly complicated topic like DP to make it feel so simple and elegant... This channel is a goldmine!

  • @suyashmisra7406
    @suyashmisra7406 Před 3 lety

    i followed your channel while i was learning to code and i recommended it to all my friends in college, especially to ones who were trying for SDE jobs but were not from CS or IT .
    I am curious as to what software (and special hardware,if any) you use for writing on screen,
    I'd love to try it once. Anyway , keep up the good work!

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

    Since a long time, I want to learn Bitmasking, I suddenly found and learn whole things.
    Thanks making this video.
    if possible, Make one more video related problem solving with bit mask.
    Best thing I learn is blocking the bits... my god so easy to understand..

  • @anubhavsethi3416
    @anubhavsethi3416 Před 3 lety +6

    Insightful and very helpful !

  • @gourav.barkle
    @gourav.barkle Před 3 lety

    Great content like always.

  • @bravitheja1142
    @bravitheja1142 Před 3 lety +1

    practiced after watching this amazing video.
    import math
    str1 = ['A','B','C']
    res=[]
    for j in range(0,int(math.pow(2, len(str1)))):
    temp = ""
    for i in range(len(str1)):
    if j & 1

  • @soumakpoddar4372
    @soumakpoddar4372 Před 3 lety +1

    The best explanation of the subset problem..........🔥🔥

  • @visheshkumargautam1683

    precise explanation thanks ,you earned a sub.

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

    Small question the bitwise & operation is checking for equality with 1, shouldn't it be checking for inequality with 0? For the bits other than LSB the result of bitwise & would be powers of 2.
    Superb explanation as always !!

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

    Great method, very intuitive!!

  • @Amitkumar-nw5mt
    @Amitkumar-nw5mt Před 3 lety +2

    Lal phul Pila phul ! your explaining technique is beautiful!!!!!!!!

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

    Very informative video.
    Thank you so much!

  • @karankanojiya7672
    @karankanojiya7672 Před rokem

    Excellent!

  • @RahulKumar-wv4ti
    @RahulKumar-wv4ti Před 3 lety +1

    What will be the time complexity if we do this using recursion? 2^N.
    If yes then bit masking is slower?

  • @sakshamkapoor5905
    @sakshamkapoor5905 Před 3 lety +16

    Lovely video, please do dp + bitmasking next, thanks!

  • @ShaliniNegi24
    @ShaliniNegi24 Před 2 lety

    Thank you :)

  • @dayanandraut5660
    @dayanandraut5660 Před 3 lety +1

    very helpful video. thank you so much

  • @algorithmo134
    @algorithmo134 Před 3 lety +1

    Omg your back!!! More leetcode video please!

  • @varswe
    @varswe Před 3 lety +1

    Amazing content quality
    ❤️❤️❤️❤️❤️❤️

  • @rosonerri-faithful
    @rosonerri-faithful Před 3 lety +5

    very nice video Surya Sir, want more of videos related to bit manipulation👏👏👏👏

  • @harshalgarg1149
    @harshalgarg1149 Před 2 lety

    Thanks

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

    When I think of logic, I am getting only the brute force logic. But if I see the answer I am understanding the logic and if any similar kind of problems occurs, I am able to use this logic in some other problems.
    But I am never getting the optimal logic so far by not seeing the solution. I am only getting the brute force logic.
    Now I feel like memorizing the logics but problem solving means deducing the solution on the spot, right? without having seen the similar problem before.
    I dont understand what I am doing, is it problem solving or memorizing the logics?
    However in any interviews, the questions will be somehow new only. It is not guaranteed that I will get only the questions which I have practised.
    Please suggest me on this.

  • @impatientgaming9868
    @impatientgaming9868 Před 2 měsíci

    Good Explanation, but i don't get why need to left shift after creating 2^n-1 bitmasks, cant we check jth bits of bitmask itself, if its 1 then take arr[j]

  • @Bhushan1234able
    @Bhushan1234able Před 3 lety

    Your videos are good, but you missed the part of explaining from mask size 0. what could be the case if our current mask is 0 ? how the j will change the mask. Just a thing which I didn't get.

  • @schan263
    @schan263 Před 9 měsíci

    I cannot find the DP + bitmasking video from the playlist.

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

    Great content. Kindly do dp + bitmasking, thanks

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

      DP + BitMasking is easier to teach in LIVE class. I have covered it in my batch :)

    • @shreyakjain9692
      @shreyakjain9692 Před 2 lety

      @@techdose4u ok then btw thnx for replying

  • @Adilakshmi_Nagiri
    @Adilakshmi_Nagiri Před 3 lety +1

    Hi Surya, Can you please explain wiggle sort II problem.

  • @The-fc1fi
    @The-fc1fi Před 3 lety +1

    Please make video remove duplicate in a string using recursion full explanation

  • @KeshariPiyush24
    @KeshariPiyush24 Před 3 lety

    Please please please make a solution video on *Leetcode 1486* it is categorised as an easy problem because expected time complexity is O(N) but using some bitmanipulation O(1) solution exists and it is very complex....so please make a video on it🥺🥺

  • @Abhishek-sz8wg
    @Abhishek-sz8wg Před 5 měsíci

    8:14 there will be 8 subsequence not subset ,am i correct ?

  • @RamSingh-zp1nl
    @RamSingh-zp1nl Před 3 lety +1

    Some of friends who works in service based company have got more compensation than the who are working in product based company......they have increased their compensation while switching by getting counter offer....they have switched to service based company only...what's the use of working in product based company

    • @techdose4u
      @techdose4u  Před 3 lety

      No need to work in product based company if you wanna rest in peace :)

  • @SauravKumar-yp1fy
    @SauravKumar-yp1fy Před 2 lety

    For anyone who tried the last question using the code in the video, In the line :
    if(mask &(1

  • @techykush7192
    @techykush7192 Před 3 lety +1

    Sir which application you used to making the video . Can you tell me the name sir

  • @sharuk3545
    @sharuk3545 Před 3 lety +1

    Make more videos sir. Its awesomeeeeee

  • @muttanagendrakumar2771
    @muttanagendrakumar2771 Před 3 lety +1

    I have to rearrange the numbers in a string in a decreasing order
    Input: 3times4 is 12
    Output:12times4 is 3
    Input: Exam23 is Endby35 tomorrow98
    Output: Exam98 is Endby35 tomorrow23
    Know the solution, take me out..

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

    Dude you should have like a billion subs. Great content.