D21
Bit Manipulation
48 stations · 21hBitwise tricks, masks and XOR properties. 48 interview problems explained by codestorywithMIK (21h of video), grouped into 3 patterns such as Bit Basics & Tricks, XOR Properties, Bitwise AND / OR on Ranges.
Start this line →- Bit Basics & Tricks29
- XOR Properties15
- Bitwise AND / OR on Ranges5
Bit Basics & Tricks
0 of 29 passed- Minimum Flips to Make a OR b Equal to cLC 1318 · 36:52MediumGoogle · MicrosoftLeetCode ↗ (opens in a new tab)
- Sort Integers by The Number of 1 BitsLC 1356 · 21:46EasyGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Number of 1 BitsLC 191 · 18:47EasyGoogle · Amazon · +9 more companiesLeetCode ↗ (opens in a new tab)
- Minimum One Bit Operations to Make Integers ZeroLC 1611 · 28:12HardGoogle · Bloomberg · +3 more companiesLeetCode ↗ (opens in a new tab)
- Maximum Number That Sum of the Prices Is Less Than or Equal to KLC 3007 · 1:06:24MediumGoogleLeetCode ↗ (opens in a new tab)
- Score After Flipping MatrixLC 861 · 35:26MediumGoogle · Amazon · +1 more companiesLeetCode ↗ (opens in a new tab)
- Find the Longest Substring Containing Vowels in Even CountsLC 1371 · 29:45MediumGoogle · Amazon · +4 more companiesLeetCode ↗ (opens in a new tab)
- Minimum Array EndLC 3133 · 31:08MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Construct the Minimum Bitwise Array I & IILC 3314 · 35:50EasyGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
- Check If a String Contains All Binary Codes of Size KLC 1461 · 12:48MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
- Concatenation of Consecutive Binary NumbersLC 1680 · 13:16MediumGoogle · Amazon · +1 more companiesLeetCode ↗ (opens in a new tab)
- Apply Operations on Array to Maximize Sum of SquaresLC 2897 · 36:27HardSprinklrLeetCode ↗ (opens in a new tab)
- Number ComplementLC 476 · 22:16EasyGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Smallest Number With All Set BitsLC 3370 · 19:27EasyGoogle · Amazon · +1 more companiesLeetCode ↗ (opens in a new tab)
- The Two Sneaky Numbers of DigitvilleLC 3289 · 27:34EasyGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
- Binary Prefix Divisible By 5LC 1018 · 19:33EasyGoogle · Amazon · +1 more companiesLeetCode ↗ (opens in a new tab)
- Binary Number with Alternating BitsLC 693 · 18:09EasyGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Prime Number of Set Bits in Binary RepresentationLC 762 · 8:00EasyGoogle · AmazonLeetCode ↗ (opens in a new tab)
- Complement of Base 10 IntegerLC 1009 · 16:09EasyGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
XOR Properties
0 of 15 passed- Single Number IILC 137 · 27:40MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
- Find The Original Array of Prefix XorLC 2433 · 13:32MediumMicrosoft · Nvidia · +1 more companiesLeetCode ↗ (opens in a new tab)
- Maximum Xor ProductLC 2939 · 58:42MediumGoogle · Atlassian · +3 more companiesLeetCode ↗ (opens in a new tab)
- Minimum Number of Operations to Make Array XOR Equal to KLC 2997 · 11:09MediumAmazonLeetCode ↗ (opens in a new tab)
- Count Triplets That Can Form Two Arrays of Equal XORLC 1442 · 24:05MediumGoogle · MetaLeetCode ↗ (opens in a new tab)
- Single Number IIILC 260 · 25:54MediumGoogle · Amazon · +5 more companiesLeetCode ↗ (opens in a new tab)
- XOR Queries of a SubarrayLC 1310 · 11:45MediumGoogle · Amazon · +1 more companiesLeetCode ↗ (opens in a new tab)
- Number of Unique XOR Triplets ILC 3513 · 22:48MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
- Number of Unique XOR Triplets IILC 3514 · 27:10MediumAmazon · Bloomberg · +1 more companiesLeetCode ↗ (opens in a new tab)
- Longest Subsequence With Non-Zero Bitwise XORLC 3702 · 16:05MediumGoogle · Bloomberg · +1 more companiesLeetCode ↗ (opens in a new tab)
- Sum of All Subset XOR TotalsLC 1863 · 25:00EasyGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
Bitwise AND / OR on Ranges
0 of 5 passed- Bitwise AND of Numbers RangeLC 201 · 34:43MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
- XOR Queries of a SubarrayLC 1310 · 11:45MediumGoogle · Amazon · +1 more companiesLeetCode ↗ (opens in a new tab)
- Largest Combination With Bitwise AND Greater Than ZeroLC 2275 · 29:40MediumGoogle · Amazon · +2 more companiesLeetCode ↗ (opens in a new tab)
- Shortest Subarray With OR at Least K IILC 3097 · 34:16MediumGoogle · Meta · +2 more companiesLeetCode ↗ (opens in a new tab)
- Smallest Subarrays With Maximum Bitwise ORLC 2411 · 43:48MediumGoogle · Amazon · +3 more companiesLeetCode ↗ (opens in a new tab)
All 48 stations in order
- 1.Minimum Flips to Make a OR b Equal to c (LeetCode 1318)
- 2.Single Number II (LeetCode 137)
- 3.Counting Bits (LeetCode 338)
- 4.Sort Integers by The Number of 1 Bits (LeetCode 1356)
- 5.Find The Original Array of Prefix Xor (LeetCode 2433)
- 6.Maximum Xor Product (LeetCode 2939)
- 7.Number of 1 Bits (LeetCode 191)
- 8.Minimum One Bit Operations to Make Integers Zero (LeetCode 1611)
- 9.Maximum Number That Sum of the Prices Is Less Than or Equal to K (LeetCode 3007)
- 10.Maximum Length of a Concatenated String with Unique Characters (LeetCode 1239)
- 11.Bitwise AND of Numbers Range (LeetCode 201)
- 12.Minimum Number of Operations to Make Array XOR Equal to K (LeetCode 2997)
- 13.Number of Wonderful Substrings (LeetCode 1915)
- 14.Score After Flipping Matrix (LeetCode 861)
- 15.Number of Steps to Reduce a Number in Binary Representation to One (LeetCode 1404)
- 16.Count Triplets That Can Form Two Arrays of Equal XOR (LeetCode 1442)
- 17.Single Number III (LeetCode 260)
- 18.XOR Queries of a Subarray (LeetCode 1310)
- 19.Find the Longest Substring Containing Vowels in Even Counts (LeetCode 1371)
- 20.Largest Combination With Bitwise AND Greater Than Zero (LeetCode 2275)
- 21.Maximum XOR for Each Query (LeetCode 1829)
- 22.Minimum Array End (LeetCode 3133)
- 23.Shortest Subarray With OR at Least K II (LeetCode 3097)
- 24.Minimize XOR (LeetCode 2429)
- 25.Neighboring Bitwise XOR (LeetCode 2683)
- 26.Bitwise XOR of All Pairings (LeetCode 2425)
- 27.Smallest Subarrays With Maximum Bitwise OR (LeetCode 2411)
- 28.Construct the Minimum Bitwise Array I & II (LeetCode 3314)
- 29.Check If a String Contains All Binary Codes of Size K (LeetCode 1461)
- 30.Concatenation of Consecutive Binary Numbers (LeetCode 1680)
- 31.Number of Unique XOR Triplets I (LeetCode 3513)
- 32.Number of Unique XOR Triplets II (LeetCode 3514)
- 33.Longest Subsequence With Non-Zero Bitwise XOR (LeetCode 3702)
- 34.Apply Operations on Array to Maximize Sum of Squares (LeetCode 2897)
- 35.Maximum K to Sort a Permutation (LeetCode 3644)
- 36.Power of Two (LeetCode 231)
- 37.Sum of All Subset XOR Totals (LeetCode 1863)
- 38.Number Complement (LeetCode 476)
- 39.Smallest Number With All Set Bits (LeetCode 3370)
- 40.The Two Sneaky Numbers of Digitville (LeetCode 3289)
- 41.Binary Prefix Divisible By 5 (LeetCode 1018)
- 42.Binary Watch (LeetCode 401)
- 43.Add Binary (LeetCode 67)
- 44.Reverse Bits (LeetCode 190)
- 45.Binary Number with Alternating Bits (LeetCode 693)
- 46.Prime Number of Set Bits in Binary Representation (LeetCode 762)
- 47.Binary Gap (LeetCode 868)
- 48.Complement of Base 10 Integer (LeetCode 1009)