Bitwise Operations for Competitive Programming | Topic Stream 8

preview_player
Показать описание
Bitwise operations - binary representation in general, the operations that can be done on binary numbers (both logical and bitwise), and some problemsolving techniques involving them. Feel free to use the timestamps to skip around to what you don't know, I started from a very basic level.

The problems are roughly ordered by difficulty.

I currently can't find a problem on bitsets, will update the mashup if I do.

I will take various questions and go over the practice problems.

Timestamps:
Intro + what is binary? 00:00
Binary representation in computers 04:49
Bitwise and logical operations (and, xor, etc.) 07:00
Builtin functions (popcount, etc.) 21:15
Some tricks/identities 26:32
Using bitmasks, bitsets, bitmask DP 31:34
Main takeaways for problemsolving 39:46
Рекомендации по теме
Комментарии
Автор

This is actually amazing! Can you do number theory next? I am really looking forward to it!!!

kushaagra
Автор

Small correction at 6:11 that will be from -(2^7) to (2^7 - 1 ) for 8 bits signed integer .

ImSaneperson
Автор

I don't know whether you are still active, but after 2 years it still helped me

rdxrdx
Автор

Thanks for the mashup and stream!! Also would really appreciate if you could cover topics in the future required for mid range participants. For ex, Grundy games, Xor Basis, probably harder adhoc problems, etc. Just harder problems in general. Really liked the dp optimization video.

godspeed
Автор

Thanks for starting it out from scratch, I'm a noob but i was actually able to wrap my head and get a fairly decent understanding!

The example problems given in between in the video to think are very helpful, i was able to arrive at the solution myself and that led to getting some confidence in the topic as well! Thank you!

supersaiyan-goku-san
Автор

Started following u after those precious topic streams and they are back now 😍😍Thanks alot @Colin

mukulkadyan
Автор

At the 38:00 minute mark, why is the complexity or number of transitions = 3^n? The transitions mentioned are conditional on the bit in the original number, right? If that bit is 0, then the submask is forced to have 0 - if the bit is 1, then the submask can have either 0 or 1 - but basically there's only 1 OR 2 transitions possible at any state.

Then why do we have 3^n, implying 3 transitions at every state?

adinonymous
Автор

Amazing vid bro!!! one of the best vids on bit manipulation out there! tysm!!

joshua_dlima
Автор

range at 6:11 is wrong:

unsigned:
its 0 to (2^8-1)

for signed its:
-(2^7) to (2^7-1)

yashjoshi
Автор

These are just incredible plz keep doing some complex topics like types of dp, segtree

akshat
Автор

Bits are independent....Wow, it made approaching problems easier

rishisharma
Автор

I have a question. For finding the k-th bit of a number x, can't we use the formula : x&(1 << k)? Great video by the way

StopRemindingMeOfThoseDays
Автор

Thank you so much bro, very very very useful, I'm very happy, I'm very thankful very much, peace ✌️

Mani_OnFire
Автор

Can you shed light on monotonic nature of AND and OR or share some resources regarding this

rajkaransingh
Автор

How many days do we have to solve the mashup ?? To stick with your plan

georgedrooj
Автор

here you said 3^n but there are many duplicates so what is the correct

SUJALCHAUHAN-cc
Автор

btw what's the time complexity of _popcount, _clz and _ctz

totallyoverdosed
Автор

When would you use bit wise operations

PepeTostado
Автор

Would actually appreciate if we picked couple problems and we implement them...Thank you

williamwambua
Автор

Not my point to cpmplain but wathcing this viedo made me watch also 20+ ads wtf

dioc