Bitwise Operations tutorial #1 | XOR, Shift, Subsets

Поділитися
Вставка
  • Опубліковано 28 лис 2024

КОМЕНТАРІ • 154

  • @bharatkumarshukla3743
    @bharatkumarshukla3743 4 роки тому +121

    Erichto please have a series for competitive programming algorithms. It would be really helpful. Nice video.

  • @rashmikiranpandit8962
    @rashmikiranpandit8962 4 роки тому +36

    You are so intellingent at the same time so humble and down to earth, thank you for sharing your knowledge. All your videos and blogs are extremely useful.

  • @poorgang
    @poorgang 4 роки тому +87

    Omg i really need this. Thank you Erricto ❤️

  • @TheSd321
    @TheSd321 4 роки тому +52

    Thanks for making videos on specific topic. I liked your tutorials on DP and Binary search (On the general way to think where to use this algo.), I would love to see similar videos. Thanks, again!

  • @muhammadhashmi1571
    @muhammadhashmi1571 4 роки тому

    The best thing about this is, you started from scratch and showed bitwise usage in iterative method. Outclass !

  • @TurboWindex
    @TurboWindex 2 роки тому

    Thank you for taking some of your time to share your knowledge, I'm sure I speak for the whole community when I say it's very appreciated.

  • @sonamsodani3272
    @sonamsodani3272 2 роки тому

    Thanks! The best explanation for bitwise operations and using bitmasking to solve subset problems.

  • @arkalykakash9475
    @arkalykakash9475 4 роки тому +1

    Got here from LC daily challenge video.
    Man this is GOLD! Thank you so much for sharing this!

  • @d4got10
    @d4got10 3 роки тому +11

    x % 2 is not exactly the same as x & 1. For non-negative number it is but if your number is negative x % 2 will give you a negative result. For example -5 % 2 = -1 and -5 & 1 = 1. Keep that in mind when you are dealing with negative numbers.

  • @angelmotta
    @angelmotta 3 роки тому

    Thanks you so much Errichto!! Excellent explanation and thanks for all your comments to keep it simple to understand! Greetings from Peru!

  • @a.syndeed
    @a.syndeed 3 роки тому

    I needed an entire hour to understand the code, but now I feel like I have the power of god (exactly what a stupid person usually thinks about themself). Thank you Errichto.

  • @radian1243
    @radian1243 4 роки тому +28

    Great video as always, but nothing beats listening to your geometry lecture in person at the POI training camp :D

    • @happyhappyguy5034
      @happyhappyguy5034 4 роки тому +1

      @Hetan Thakkar sorry no

    • @radian1243
      @radian1243 4 роки тому

      @Hetan Thakkar no, it wasn't filmed, just listened to as a way of preparation for the POI

  • @chengjinfei8139
    @chengjinfei8139 2 роки тому

    This is the best tutorial for bitwise operation.

  • @d.d898
    @d.d898 4 роки тому

    your videos are the best one competitive programmer can as for!!!!

  • @prantasaha7426
    @prantasaha7426 4 роки тому +15

    I found many tricky problems with XOR in different contests. A lot can be done on this topic. So if you make a separate video on the tactics and ingenuity of XOR, we would benefit.

  • @UnfunnyXavier
    @UnfunnyXavier 4 роки тому +36

    *I* *like* *his* *accent*

    • @Errichto
      @Errichto  4 роки тому +11

      Well... thanks, I guess :D

  • @jazzhippie3878
    @jazzhippie3878 3 роки тому

    Errichto!!!! The Khabib of programming!

  • @anshjain257
    @anshjain257 4 роки тому

    Beautifully explained man . Plz add more and more videos on bit manipulation.

  • @shreyasingh542
    @shreyasingh542 3 роки тому

    Isn't he lovely? Great explanation straight to the point unlike others💛

  • @Artificial_Intelligence_AI
    @Artificial_Intelligence_AI 4 роки тому +6

    new subscriber because of how well you explained this!!! I'll start watching all your content and see what I can find :D

  • @Ashwanisharma-sf7ri
    @Ashwanisharma-sf7ri 4 роки тому

    Thankyou Kamil , detailed videoes on several topics from beginner to high level will be highly appreciated....

  • @josephwong2832
    @josephwong2832 4 роки тому

    Thanks for the videos on bit manipulation Errichto!!

  • @juliap.5610
    @juliap.5610 3 роки тому

    Thank you so much 🥰🥰 I finally understand how the algorithm to print the binary representation works! You're a such a good teacher

  • @goni2867
    @goni2867 4 роки тому

    Thank you very much! I am preparing for the informatics olympiad and I was searching for exactly these things for a long time.

  • @ManojKumar-hj7fh
    @ManojKumar-hj7fh 4 роки тому

    Hello Errichto
    Thank you for all the knowledge.
    Keep making more videos on Data structures and algorithms.

  • @suryanshgoel7062
    @suryanshgoel7062 3 роки тому

    Great Work Sir...Really Appreciate your work...Please keep on uploading.

  • @pratyakshabais7599
    @pratyakshabais7599 Рік тому +1

    suggestion : plz put playlist link as well in the description

  • @gurisingh91298
    @gurisingh91298 2 роки тому +3

    Sir please have a complete course/series for competitive programming(including data structures and with practice questions) . It would be really helpful.

  • @1moreredcoder
    @1moreredcoder 2 роки тому

    lotes of love sir please upload all algorithm
    💥💥

  • @tzhou3301
    @tzhou3301 4 роки тому

    This is great. Looking forward to the next one!

  • @shreyashvardhan5777
    @shreyashvardhan5777 4 роки тому

    your tutorials are awesome !! please make more of them .

  • @jimmyshenmusic
    @jimmyshenmusic 4 роки тому

    Thanks for your posting. It is excellent as always.

  • @faridgadzhiev1440
    @faridgadzhiev1440 4 роки тому +2

    Thank you, Errichto, very much appreciated!

  • @nassimnedjar2063
    @nassimnedjar2063 4 роки тому

    a good tutorial , good job Errichto

  • @suryaakella4508
    @suryaakella4508 4 роки тому +1

    badly needed this video thanks a lot

  • @codecaine
    @codecaine 2 роки тому

    Excellent examples

  • @fbru02
    @fbru02 4 роки тому

    Can't wait for next one!

  • @PoCTu85
    @PoCTu85 4 роки тому

    This was very informative. Good job!

  • @antonykelvin6645
    @antonykelvin6645 4 роки тому

    Great Video! Waiting for the next lecture :D

  • @wannabe945
    @wannabe945 4 роки тому

    Thanks, man. Waiting for the next part. :)

  • @Exzone
    @Exzone 4 роки тому +3

    Amazing video! Amazing explanation. Maybe you could do a video on bitwise interesting problems, like, in an array where elements repeat find one that doesnt repeat etc.
    I enjoy watching your videos

    • @Zzznmop
      @Zzznmop 4 роки тому +1

      Exzone check out Errichto2 channel live-streams, he covers the whole leetcode “interview prep” series in one, which contains many similar problem types to the one you mention

    • @RahulPal-mz4oj
      @RahulPal-mz4oj 4 роки тому

      @@Zzznmop Can u please provide the link to that video where he explains interview prep questions

  • @frameworklabs
    @frameworklabs 4 роки тому

    Amazing explanation, thank you so much

  • @jaybabaofficial
    @jaybabaofficial 3 роки тому

    Very very thank you sir for this video I just subscribed your channel after seeing this video

  • @vishvish
    @vishvish 3 роки тому

    Thanks for this, really helpful video. I found the ending on subsets slightly confusing, and did not understand it, but everything else was great!

  • @krishshah3974
    @krishshah3974 3 роки тому

    This was so nicely explained! Thank you so much. :)

  • @giant3dorangutanmodel89
    @giant3dorangutanmodel89 3 роки тому

    This was extremely helpful, thank you

  • @ayushkumar-wt2wm
    @ayushkumar-wt2wm 4 роки тому

    Big fan sir...Very nice explanation

  • @jean-michelcid9594
    @jean-michelcid9594 4 роки тому

    last algo was amazing.

  • @mani_naik
    @mani_naik 4 роки тому +1

    Eager for the bitsets video

  • @naturalblisshealers5576
    @naturalblisshealers5576 3 роки тому

    Nice explanation

  • @bikideka7880
    @bikideka7880 3 роки тому +1

    I found your binary to decimal converter technique very interesting 3:20

  • @danialbagdatuly5618
    @danialbagdatuly5618 4 роки тому

    We need 2 part Erricto)!

  • @rafayeathossain8731
    @rafayeathossain8731 4 роки тому +1

    nice work,love it

  • @bhavana6544
    @bhavana6544 3 роки тому

    Sir...thank you very very much for the great help that you have provided through these videos . I feel very sad that I couldn't get to these videos earlier. Anyway . I love your videos n pattern of teaching . Thanks again a lot❤️

  • @raselhasan2433
    @raselhasan2433 4 роки тому

    Thanks for this tutorial, as I am a beginner it helped me a lot, Waiting for your best lectures/

  • @shivamanand8998
    @shivamanand8998 4 роки тому

    Very well explained Thank You

  • @mxschumacher
    @mxschumacher 4 роки тому +24

    "Appending at the beginning" is prepending

    • @Zzznmop
      @Zzznmop 4 роки тому +1

      Max Schumacher does appending necessarily imply front or back of a list? I don’t know if it does

    • @MojahooProducer
      @MojahooProducer 4 роки тому

      zach p ya it does, appending is defined in programming as an attachment to the end of some list or other data structure (like a queue)

    • @Errichto
      @Errichto  4 роки тому +27

      Thanks, good to know.

  • @lepord833
    @lepord833 4 роки тому

    Thankyou so much , It's really helpful

  • @rajarshibose5122
    @rajarshibose5122 4 роки тому

    Thank you so much, eagerly waiting for part 2

  • @bishnuprasadnayak9520
    @bishnuprasadnayak9520 4 роки тому +1

    well you said there is a recursive version of sum of subsets, but first of all i'm not able to come up with a recurrence relation of just finding all the subsets of a given set, i know it's done using recursion and backtracking but just for the mathematical intuition if you can provide with that recurrence relation???

  • @tanvirhasan4912
    @tanvirhasan4912 4 роки тому +2

    Before I even watch this....Thank you.

  • @ishanshah3309
    @ishanshah3309 4 роки тому

    Programming Legend!

  • @ShivamSingh-vu8vq
    @ShivamSingh-vu8vq 4 роки тому

    Thanks , I was looking for this

  • @fuadalhasan1784
    @fuadalhasan1784 4 роки тому

    Wow,... Really nice video.. I Need this kind of video❤

  • @mohammedasif7922
    @mohammedasif7922 3 роки тому

    Thanks! Errichto? I mean Kamil

  • @jameysiddiqui6910
    @jameysiddiqui6910 4 роки тому

    in in 32 bit integer if MSB is 1 and left shift is done MSB is lost same as if right shift is done and LSB is 1

  • @seanyong3399
    @seanyong3399 3 місяці тому

    can someone explain the last few minutes? what exactly is his code doing? i dont understand why iterating through all the bits and comparing it with the mask will give u the number of subsets? pls explain tqvm!

  • @martjao
    @martjao 4 роки тому

    Awesome video!, I would like to see more videos about DP :D

  • @kevinje3971
    @kevinje3971 3 роки тому

    thanks, would you recommend books about this topics particularly?

  • @ascyrax8507
    @ascyrax8507 4 роки тому +1

    thanks a tonne..HOPE U KEEP GETTING ENOUGH FREE TIME TO MAKE MORE VIDEOS LIKE THIS...REALLY HELPFUL FOR NOOB COMPETITIVE PROGRAMMERS LIKE ME.

  • @Setofhornsandahalo
    @Setofhornsandahalo 4 роки тому

    Hey, thanks for the tutorial. What is the point of doing the for loop on 7:02. Are you looking for the similar x values in the 0...30?

  • @ShubhamPandey-un2sy
    @ShubhamPandey-un2sy 4 роки тому

    what does n denote here?
    Number of bits which are to be used or number of elements in the array for which subset problem is to be solved.

  • @Rahul-ys3yh
    @Rahul-ys3yh 4 роки тому

    This video is treasure!

  • @ZERINSHAIMAMEEM
    @ZERINSHAIMAMEEM 4 роки тому

    Thanks a lot Errichto!!

  • @rajg7592
    @rajg7592 3 роки тому

    niesamowity!!!!

  • @ask4144
    @ask4144 4 роки тому +1

    thank you Errichto! where could I find exercises like the last one?

  • @suhailakhtar1707
    @suhailakhtar1707 4 роки тому

    You are the best.

  • @Jayanthsattineni
    @Jayanthsattineni 4 роки тому +1

    I have a doubt...
    Is predefined stl library functions such as sum or sort are better or manual algo is better for completive programming?

    • @adarshverma013
      @adarshverma013 4 роки тому

      use stl that will save your time and will be more efficient than your written algo

  • @nikhillondhe5815
    @nikhillondhe5815 4 роки тому

    Yes! Much needed

  • @lovleshbhatt7797
    @lovleshbhatt7797 4 роки тому

    Erichto brother u r writing without seeing down to screen , howzzz u do that buddy...
    Awesome guidance and teaching from erichto..

  • @ElifArslan-l9g
    @ElifArslan-l9g 3 роки тому

    thank you so much

  • @fahimashab1559
    @fahimashab1559 4 роки тому

    Just Awesome!!!

  • @mechashadowx
    @mechashadowx 4 роки тому

    OMG, that was amazing.

  • @avatarek199
    @avatarek199 4 роки тому +4

    Got one question what is a[i], ok I know its the i-th element, though where is a defined ?

    • @shivambansal1250
      @shivambansal1250 4 роки тому

      Exactly what i was searching for?

    • @Danny-007
      @Danny-007 3 роки тому

      I think we assume a as array of n elements....

  • @Garentei
    @Garentei 4 роки тому

    Would love to see some bitmask dp later on too :D thanks

  • @diegonayalazo
    @diegonayalazo 3 роки тому

    Thanks!

  • @sharadVlogs01
    @sharadVlogs01 4 роки тому

    valuable video

  • @shreerammohanty1551
    @shreerammohanty1551 4 роки тому

    Can you please suggest the software which you use to create these kind of videos???? Like your own video + the writing thing at one page???

  • @d001-x8u
    @d001-x8u 4 місяці тому

    thank u so much❤

  • @BedoEbied
    @BedoEbied 4 роки тому +1

    Is it possible to get familiar with this??

  • @max-tq8qh
    @max-tq8qh 2 роки тому

    No nie kłamiesz, fajnie wyjaśnione

  • @rohanthube2920
    @rohanthube2920 4 роки тому

    Very helpful🤟

  • @acenitd9198
    @acenitd9198 4 роки тому

    What is the time complexity of the algorithm used ?

  • @chillerop5110
    @chillerop5110 2 роки тому

    I didn't get how we calcuate the subset values using that loop

  • @manilalgorai7404
    @manilalgorai7404 4 роки тому

    Thank you.

  • @Digimonfusion280
    @Digimonfusion280 4 роки тому

    Where do you learn this? I am making computer science and have never even heard of bitwise operations

  • @thetrainoflife8327
    @thetrainoflife8327 3 роки тому

    you are great

  • @mandeepubhi4744
    @mandeepubhi4744 4 роки тому

    Could you do videos on recursion?

  • @rishabhgupta7976
    @rishabhgupta7976 4 роки тому

    can you make videos on segmented trees implementation it will be very helpfull!!

  • @sayedulabrar2574
    @sayedulabrar2574 4 роки тому

    sir can u please explain what do you mean by a[i]?