Concepts of Bitmasking
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...
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!
Great :)
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!
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..
:)
Insightful and very helpful !
Thanks 😊
Great content like always.
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
Great :)
The best explanation of the subset problem..........🔥🔥
Thanks
precise explanation thanks ,you earned a sub.
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 !!
Great method, very intuitive!!
Thanks ❤️
Lal phul Pila phul ! your explaining technique is beautiful!!!!!!!!
😂
Very informative video.
Thank you so much!
Welcome 😀
Excellent!
What will be the time complexity if we do this using recursion? 2^N.
If yes then bit masking is slower?
Lovely video, please do dp + bitmasking next, thanks!
Sure
Thank you :)
very helpful video. thank you so much
Welcome
Omg your back!!! More leetcode video please!
Sure
Amazing content quality
❤️❤️❤️❤️❤️❤️
:)
very nice video Surya Sir, want more of videos related to bit manipulation👏👏👏👏
👍🏼
Thanks
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.
You need more practice
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]
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.
I cannot find the DP + bitmasking video from the playlist.
Great content. Kindly do dp + bitmasking, thanks
DP + BitMasking is easier to teach in LIVE class. I have covered it in my batch :)
@@techdose4u ok then btw thnx for replying
Hi Surya, Can you please explain wiggle sort II problem.
👍🏼
Please make video remove duplicate in a string using recursion full explanation
👍🏼
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🥺🥺
8:14 there will be 8 subsequence not subset ,am i correct ?
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
No need to work in product based company if you wanna rest in peace :)
For anyone who tried the last question using the code in the video, In the line :
if(mask &(1
correctumundo....
Sir which application you used to making the video . Can you tell me the name sir
S sir pls say the application name?
@@onestopplacement4917 pta chale to mere ko msg kr dena okk bro
@@mnnitianexplains7325 plz tell me in english bro
@@onestopplacement4917 right i want to say that if any time u get name of appilcation used by tech doze so u can tell me
Make more videos sir. Its awesomeeeeee
Sure.
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..
Dude you should have like a billion subs. Great content.
Thanks 😊