Bitwise Operations tutorial #1 | XOR, Shift, Subsets

  Рет қаралды 215,366

Errichto Algorithms

Errichto Algorithms

Күн бұрын

Пікірлер: 154
@bharatkumarshukla3743
@bharatkumarshukla3743 4 жыл бұрын
Erichto please have a series for competitive programming algorithms. It would be really helpful. Nice video.
@rashmikiranpandit8962
@rashmikiranpandit8962 4 жыл бұрын
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.
@TheSd321
@TheSd321 4 жыл бұрын
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!
@poorgang
@poorgang 4 жыл бұрын
Omg i really need this. Thank you Erricto ❤️
@muhammadhashmi1571
@muhammadhashmi1571 4 жыл бұрын
The best thing about this is, you started from scratch and showed bitwise usage in iterative method. Outclass !
@sonamsodani3272
@sonamsodani3272 2 жыл бұрын
Thanks! The best explanation for bitwise operations and using bitmasking to solve subset problems.
@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.
@radian1243
@radian1243 4 жыл бұрын
Great video as always, but nothing beats listening to your geometry lecture in person at the POI training camp :D
@happyhappyguy5034
@happyhappyguy5034 4 жыл бұрын
@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
@arkalykakash9475
@arkalykakash9475 4 жыл бұрын
Got here from LC daily challenge video. Man this is GOLD! Thank you so much for sharing this!
@d4got10
@d4got10 3 жыл бұрын
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!
@chengjinfei8139
@chengjinfei8139 2 жыл бұрын
This is the best tutorial for bitwise operation.
@prantasaha7426
@prantasaha7426 4 жыл бұрын
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.
@Ashwanisharma-sf7ri
@Ashwanisharma-sf7ri 4 жыл бұрын
Thankyou Kamil , detailed videoes on several topics from beginner to high level will be highly appreciated....
@Artificial_Intelligence_AI
@Artificial_Intelligence_AI 4 жыл бұрын
new subscriber because of how well you explained this!!! I'll start watching all your content and see what I can find :D
@d.d898
@d.d898 4 жыл бұрын
your videos are the best one competitive programmer can as for!!!!
@anshjain257
@anshjain257 4 жыл бұрын
Beautifully explained man . Plz add more and more videos on bit manipulation.
@UnfunnyXavier
@UnfunnyXavier 4 жыл бұрын
*I* *like* *his* *accent*
@Errichto
@Errichto 4 жыл бұрын
Well... thanks, I guess :D
@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.
@jazzhippie3878
@jazzhippie3878 3 жыл бұрын
Errichto!!!! The Khabib of programming!
@gurisingh91298
@gurisingh91298 2 жыл бұрын
Sir please have a complete course/series for competitive programming(including data structures and with practice questions) . It would be really helpful.
@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.
@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
@shreyasingh542
@shreyasingh542 3 жыл бұрын
Isn't he lovely? Great explanation straight to the point unlike others💛
@Exzone
@Exzone 4 жыл бұрын
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 жыл бұрын
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
@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!
@suryaakella4508
@suryaakella4508 4 жыл бұрын
badly needed this video thanks a lot
@1moreredcoder
@1moreredcoder 2 жыл бұрын
lotes of love sir please upload all algorithm 💥💥
@suryanshgoel7062
@suryanshgoel7062 3 жыл бұрын
Great Work Sir...Really Appreciate your work...Please keep on uploading.
@pratyakshabais7599
@pratyakshabais7599 Жыл бұрын
suggestion : plz put playlist link as well in the description
@shreyashvardhan5777
@shreyashvardhan5777 4 жыл бұрын
your tutorials are awesome !! please make more of them .
@tzhou3301
@tzhou3301 4 жыл бұрын
This is great. Looking forward to the next one!
@faridgadzhiev1440
@faridgadzhiev1440 4 жыл бұрын
Thank you, Errichto, very much appreciated!
@codecaine
@codecaine 2 жыл бұрын
Excellent examples
@nassimnedjar2063
@nassimnedjar2063 4 жыл бұрын
a good tutorial , good job Errichto
@jimmyshenmusic
@jimmyshenmusic 4 жыл бұрын
Thanks for your posting. It is excellent as always.
@fbru02
@fbru02 4 жыл бұрын
Can't wait for next one!
@jean-michelcid9594
@jean-michelcid9594 4 жыл бұрын
last algo was amazing.
@mani_naik
@mani_naik 4 жыл бұрын
Eager for the bitsets video
@wannabe945
@wannabe945 4 жыл бұрын
Thanks, man. Waiting for the next part. :)
@PoCTu85
@PoCTu85 4 жыл бұрын
This was very informative. Good job!
@antonykelvin6645
@antonykelvin6645 4 жыл бұрын
Great Video! Waiting for the next lecture :D
@danialbagdatuly5618
@danialbagdatuly5618 4 жыл бұрын
We need 2 part Erricto)!
@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❤️
@jaybabaofficial
@jaybabaofficial 3 жыл бұрын
Very very thank you sir for this video I just subscribed your channel after seeing this video
@rafayeathossain8731
@rafayeathossain8731 4 жыл бұрын
nice work,love it
@krishshah3974
@krishshah3974 3 жыл бұрын
This was so nicely explained! Thank you so much. :)
@raselhasan2433
@raselhasan2433 4 жыл бұрын
Thanks for this tutorial, as I am a beginner it helped me a lot, Waiting for your best lectures/
@bikideka7880
@bikideka7880 3 жыл бұрын
I found your binary to decimal converter technique very interesting 3:20
@giant3dorangutanmodel89
@giant3dorangutanmodel89 3 жыл бұрын
This was extremely helpful, thank you
@wesammustafa9004
@wesammustafa9004 4 жыл бұрын
Amazing explanation, thank you so much
@naturalblisshealers5576
@naturalblisshealers5576 3 жыл бұрын
Nice explanation
@ayushkumar-wt2wm
@ayushkumar-wt2wm 4 жыл бұрын
Big fan sir...Very nice explanation
@shivamanand8998
@shivamanand8998 4 жыл бұрын
Very well explained Thank You
@lepord833
@lepord833 4 жыл бұрын
Thankyou so much , It's really helpful
@ShivamSingh-vu8vq
@ShivamSingh-vu8vq 4 жыл бұрын
Thanks , I was looking for this
@ishanshah3309
@ishanshah3309 4 жыл бұрын
Programming Legend!
@martjao
@martjao 4 жыл бұрын
Awesome video!, I would like to see more videos about DP :D
@rajarshibose5122
@rajarshibose5122 4 жыл бұрын
Thank you so much, eagerly waiting for part 2
@fuadalhasan1784
@fuadalhasan1784 4 жыл бұрын
Wow,... Really nice video.. I Need this kind of video❤
@bishnuprasadnayak9520
@bishnuprasadnayak9520 4 жыл бұрын
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 жыл бұрын
Before I even watch this....Thank you.
@mxschumacher
@mxschumacher 4 жыл бұрын
"Appending at the beginning" is prepending
@Zzznmop
@Zzznmop 4 жыл бұрын
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 жыл бұрын
Thanks, good to know.
@nikhillondhe5815
@nikhillondhe5815 4 жыл бұрын
Yes! Much needed
@ascyrax8507
@ascyrax8507 4 жыл бұрын
thanks a tonne..HOPE U KEEP GETTING ENOUGH FREE TIME TO MAKE MORE VIDEOS LIKE THIS...REALLY HELPFUL FOR NOOB COMPETITIVE PROGRAMMERS LIKE ME.
@Rahul-ys3yh
@Rahul-ys3yh 4 жыл бұрын
This video is treasure!
@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!
@ZERINSHAIMAMEEM
@ZERINSHAIMAMEEM 4 жыл бұрын
Thanks a lot Errichto!!
@mohammedasif7922
@mohammedasif7922 3 жыл бұрын
Thanks! Errichto? I mean Kamil
@Jayanthsattineni
@Jayanthsattineni 4 жыл бұрын
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
@rajg7592
@rajg7592 3 жыл бұрын
niesamowity!!!!
@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?
@ask4144
@ask4144 4 жыл бұрын
thank you Errichto! where could I find exercises like the last one?
@Garentei
@Garentei 4 жыл бұрын
Would love to see some bitmask dp later on too :D thanks
@mechashadowx
@mechashadowx 4 жыл бұрын
OMG, that was amazing.
@BedoEbied
@BedoEbied 4 жыл бұрын
Is it possible to get familiar with this??
@kevinje3971
@kevinje3971 3 жыл бұрын
thanks, would you recommend books about this topics particularly?
@suhailakhtar1707
@suhailakhtar1707 4 жыл бұрын
You are the best.
@avatarek199
@avatarek199 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....
@fahimashab1559
@fahimashab1559 4 жыл бұрын
Just Awesome!!!
@sharadVlogs01
@sharadVlogs01 4 жыл бұрын
valuable video
@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
@rohanthube2920
@rohanthube2920 4 жыл бұрын
Very helpful🤟
@chillerop5110
@chillerop5110 2 жыл бұрын
I didn't get how we calcuate the subset values using that loop
@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.
@vudo1013
@vudo1013 4 ай бұрын
thank u so much❤
@jameysiddiqui6910
@jameysiddiqui6910 3 жыл бұрын
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
@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???
@diegonayalazo
@diegonayalazo 3 жыл бұрын
Thanks!
@Digimonfusion280
@Digimonfusion280 4 жыл бұрын
Where do you learn this? I am making computer science and have never even heard of bitwise operations
@manilalgorai7404
@manilalgorai7404 4 жыл бұрын
Thank you.
@gmmkeshav
@gmmkeshav 4 жыл бұрын
sir is bitwise shift valid for negative value
@acenitd9198
@acenitd9198 4 жыл бұрын
What is the time complexity of the algorithm used ?
@75395146100
@75395146100 4 жыл бұрын
How do you decide that this problem can be solved using bit operation..I know for basic like if we see xor ya or in question we try to use bitwise but how to get intuition for other questions where we don't see any pattern of using bits??
@Errichto
@Errichto 4 жыл бұрын
Just like for any technique: solve a few problems in this topic and then you will start recognizing patterns. Things related to sets and intersections are often solved with bitmasks/bitsets.
@Mike-mw1fu
@Mike-mw1fu 4 жыл бұрын
How should I handle negative number with bitwsie Operation, Errichto?
@Errichto
@Errichto 4 жыл бұрын
What do you want to do with negative values? They are represented in binary system in computer so it's possible to compute their bitwise XOR, etc., but what do you want to achieve this way?
@Mike-mw1fu
@Mike-mw1fu 4 жыл бұрын
I really need this video. Thanks a billion
@max-tq8qh
@max-tq8qh 2 жыл бұрын
No nie kłamiesz, fajnie wyjaśnione
@mandeepubhi4744
@mandeepubhi4744 4 жыл бұрын
Could you do videos on recursion?
C++ Bitsets in Competitive Programming
15:35
Errichto Algorithms
Рет қаралды 120 М.
Bitwise Operations for Competitive Programming | Topic Stream 8
42:22
Car Bubble vs Lamborghini
00:33
Stokes Twins
Рет қаралды 39 МЛН
小丑揭穿坏人的阴谋 #小丑 #天使 #shorts
00:35
好人小丑
Рет қаралды 48 МЛН
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 275 #shorts
00:29
КОГДА К БАТЕ ПРИШЕЛ ДРУГ😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 7 МЛН
Bitwise Operations & Bit Masking
13:08
Learn Learn Scratch Tutorials
Рет қаралды 37 М.
Google Coding Interview With A Competitive Programmer
54:17
Clément Mihailescu
Рет қаралды 2,5 МЛН
Binary Exponentiation
15:13
Errichto Algorithms
Рет қаралды 101 М.
Bit Manipulation
34:20
Make School
Рет қаралды 61 М.
Binary Search tutorial (C++ and Python)
27:41
Errichto Algorithms
Рет қаралды 263 М.
Add Two Numbers Without The "+" Sign (Bit Shifting Basics)
18:25
Back To Back SWE
Рет қаралды 125 М.
Dynamic Programming lecture #1 - Fibonacci, iteration vs recursion
19:47
Errichto Algorithms
Рет қаралды 315 М.
Sparse Table & RMQ (Range Minimum Query)
18:42
Errichto Algorithms
Рет қаралды 78 М.
Hamming codes part 2: The one-line implementation
16:50
3Blue1Brown
Рет қаралды 867 М.
Car Bubble vs Lamborghini
00:33
Stokes Twins
Рет қаралды 39 МЛН