In this video, I'll talk about all tricks & pattern that will be used in any of your Bit Manipulation Problems.
Let's Connect:
📱Discord (Join Community) : https://discord.gg/vwUAz2pEHZ
📝Linkedin: https://www.linkedin.com/in/aryan-mittal-0077
📸 Instagram: https://www.instagram.com/codeWithAryanBhai
💻 Twitter - https://twitter.com/aryan_mittal007
🤖 Github: https://github.com/aryan-0077
Easy
1. Making use of bitArray & adding nums in bitArray - • 3097. Shortest Subarray With OR at Le...
2. What makes a binary Number Odd & maximise Binary Reprsentation - • 2864. Maximum Odd Binary Number | Sor...
3. Using XOR property we learned in Course - • 268. Missing Number | HashMap | Bit M...
4. Using Remove Last set bit concept - • 231. Power of Two | Bit Manipulation ...
5. Using help of individual bits of a number - • 169. Majority Element | HashMap| Sort...
Medium
1. Pattern of Bit representation in Consecutive Numbers - • 3007. Maximum Number That Sum of the ...
2. Taking use of extra space out of 32 Bits [Space Optimization] - • 661. Image Smoother | Bit Manipulation
3. When to use OR, when to use XOR - • Single Number II II 4 -Methods II Bit...
4. AND, OR, XOR (In 1 Problem) - • Minimum Flips to Make a OR b Equal to...
5. Convert string to binary representation Trick - • 1239. Maximum Length of Concatenated ...
6. Convert Path in Graph (Vector to binary representation) - • 1457. Pseudo-Palindromic Paths in a B...
7. Using Removing Last set bit concept - • 201. Bitwise AND of Numbers Range | R...
8. Bit Interleaving | Bit Interweaving - • 3133. Minimum Array End | Bit Interwe...
Hard
1. Prefix XOR effect - • 1915. Number of Wonderful Substrings ...
2. Generating all subsets | subsequences (+Inclusion Exclusion) - • 3116. Kth Smallest | Math | Inclusion...
3. Optimising Time in DP using Bit Manipulation (Standard optimization technique) - • Smallest Sufficient Team II DP II Bit...
Most Commonly asked by FAANG:
1. https://leetcode.com/problems/power-of-two/ -
• 231. Power of Two | Bit Manipulation ...
2. https://leetcode.com/problems/divide-two-i...
3. https://leetcode.com/problems/single-numbe...
4. • 260. Single Number III | XOR Properti...
5. https://leetcode.com/problems/powx-n/
6. https://leetcode.com/problems/n-queens/
7. https://leetcode.com/problems/minimum-bit-...
8. https://leetcode.com/problems/counting-bits/
9. https://leetcode.com/problems/missing-numb... -
• 268. Missing Number | HashMap | Bit M...
10. https://leetcode.com/problems/majority-ele... -
• 169. Majority Element | HashMap| Sort...
About Me:
I am Aryan Mittal - A Software Engineer in Goldman Sachs, Speaker, Creator & Educator. During my free time, I create programming education content on this channel & also how to use that to grow :)
✨ Timelines✨
0:00 - Intro & What we gonna cover.
0:52 - What is Bit Manipulation & Binary Numbers.
1:30 - Convert Decimal to Binary & Convert Binary to Decimal & Count # of set Bits
17:56 - Why are Binary Numbers useful in DSA & CP
19:16 - 32Bit & 64Bit & Representation of -ive decimal number (1s Compliment & 2s Compliment)
25:46 - Addition & Subtraction of Binary Numbers
27:20 - AND, OR, XOR, NOT Bitwise Operator [When & Where to use them] [Flip ith Bit] [IMPORTANT TRICKS]
33:18 - What is Mask, How it is Made, Where it is Used ?
36:34 - Left Shift & Right Shift Operators.
43:00 - Set & unset the i-th
47:30 - Check if i-th Bit is set or unset
51:58 - Flip/Remove Rightmost Set Bit
1:00:17 - Outro & Recap
✨ Hashtags ✨
#programming #Interviews #leetcode #faang #maang #datastructures #algorithms