Bit Manipulation Mastery
A curated bit manipulation path: XOR, popcount, masking, subsets, and advanced bitwise logic. 36 problems across 7 progressive sections.
213Total
1Find Unique Element
easy
2Unique Element Among Triplesmedium
3Two Unique Elementsmedium
4Missing Sequence Numbereasy
5Decode XOR Arrayeasy
6Find the Differenceeasy
7Find XOR of All Pairingsmedium
8Recover Array from Prefix XORmedium
9Find XOR Beautymedium
10Maximum XOR Per Querymedium
11Max XOR After Operationsmedium
12Make Array XOR Equal to Kmedium
13Decode XOR Permutationmedium
14Kth Largest XOR Coordinatemedium
15Count Triplets Equal XORmedium
16Chalkboard XOR Gamehard
17Count Pairs With XOR in Rangehard
18XOR Sum of All Pairs ANDhard
19Min XOR Sum of Two Arrayshard
20Subsequence With XOR Value Kmedium
21Make XOR of All Segments Zerohard
22Minimum XORmedium
23Neighboring Bitwise XORmedium
24Find Missing and Repeated Valuesmedium
25XOR Queries of Subarraymedium
26Sum of Subset XOR Totalseasy
1Popcount
easy
2Counting Bitseasy
3Reverse Bitseasy
4Hamming Distanceeasy
5Total Hamming Distancemedium
6Sort by Number of Set Bitseasy
7Sum at Set Bit Indiceseasy
8Prime Set Bitseasy
9Even and Odd Bit Positionseasy
10Number of Bit Changeseasy
11Minimum Bit Flipseasy
12Count Winning Playerseasy
13Identify the Largest Outliermedium
14Max Possible Binary Concatenationmedium
15Pretty Subsets Countmedium
1Number Complement
easy
2Base-10 Complementeasy
3Binary Gapeasy
4Alternating Bits Checkeasy
5Smallest Number With All Set Bitseasy
6Find K-OR of Arrayeasy
7Check Trailing Zeros in OReasy
8Binary Watcheasy
9Convert to Hexadecimaleasy
10Binary Prefix Divisible by 5easy
11Steps to One (Binary Reduction)medium
12Steps to Zeroeasy
13Add Binary Stringseasy
14Convert Binary Linked Listeasy
15Find Subarrays With Equal Sumeasy
16Divide Array Into Equal Pairseasy
17Construct Min Bitwise Array Ieasy
18Construct Min Bitwise Array IImedium
19Encode Numbermedium
1Is Power of Two
easy
2Is Power of Foureasy
3Is Power of Threeeasy
4XOR in Arrayeasy
5Maximum Strong Pair XOR Ieasy
6Integer Replacementmedium
7Min Operations to Reduce to 0medium
8K-th Symbol in Grammarmedium
9Alternating Binary Stringeasy
10Generate Binary No Adjacent Zerosmedium
11Concat Binary Numbersmedium
12Gray Codemedium
13UTF-8 Validationmedium
14Circular Permutation in Binarymedium
15K-th Character in String Game Ieasy
16K-th Character in String Game IIhard
1Range AND Query
medium
2Score After Flipping Matrixmedium
3Largest AND Combinationmedium
4Prefix Common Arraymedium
5Longest Nice Subarraymedium
6Smallest Subarray Max ORmedium
7Shortest Subarray OR ≥ K Ieasy
8Shortest Subarray OR ≥ K IImedium
9Shortest Subarray OR ≥ Kmedium
10Bitwise ORs of Subarraysmedium
11Minimize OR Remaininghard
12Minimize XOR Valuemedium
13Max OR Valuemedium
14Min Ops Values Equal to Kmedium
15Min K Consecutive Bit Flipshard
16Min Flips Binary Grid Palindromicmedium
17Max Integers From Rangemedium
18Partition Value Findermedium
19Longest Subarray Max ANDmedium
20Count Fair Pairsmedium
21Separate Black and White Ballsmedium
22Max Robots in Budgethard
23Count Good Mealsmedium
24Min Ops Binary Array to Onemedium
25Sortable Array Checkmedium
26Bitwise OR of Adjacent Elementseasy
27AND of Triples Zerohard
28Set Mismatch Findereasy
29Find Duplicate in Arraymedium
30Score After Removalshard
1Generate All Subsets
medium
2Subsets With Duplicatesmedium
3Max Product of Word Lengthsmedium
4Check All Binary Codes of Size Kmedium
5Repeated DNA Sequencesmedium
6Letter Case Permutationmedium
7Non-Decreasing Subsequencesmedium
8Max Length Concat Unique Charsmedium
9Count Max Bitwise-OR Subsetsmedium
10Max Points in Archerymedium
11Cinema Seat Allocationmedium
12Naming a Companyhard
13Number of Wonderful Substringsmedium
14Pseudo-Palindromic Pathsmedium
15Longest Vowel Even Substringmedium
16Count Nice Pairsmedium
17Longest Awesome Substringhard
18Count Subsets With Even XOR Ieasy
19Count Subsets With Even XOR IImedium
1Beautiful Arrangement
medium
2Partition to K Equal Summedium
3Matchsticks to Squaremedium
4Can I Winmedium
5Shopping Offersmedium
6Special Permutationsmedium
7Max AND Sum of Arrayhard
8Max Compatibility Scoremedium
9Min Work Sessionsmedium
10Max Palindromic Productmedium
11Fair Distribution of Cookiesmedium
12Max Rows Covered by Columnsmedium
13Min Moves Spread Stonesmedium
14Min Cost Connect Groupshard
15Count Subtrees Max Distancehard
16Stickers to Spell Wordhard
17Parallel Courses IIhard
18Smallest Sufficient Teamhard
19Shortest Path Visiting All Nodeshard
20Split Array Same Averagehard
21Max Transfer Requestshard
22Distribute Repeating Integershard
23Min Time Finish All Jobshard
24Maximize Score After N Opshard
25Max Students Taking Examhard
26Max Score Words Formedhard
27Ways to Wear Distinct Hatshard
28Optimal Account Balancinghard
29Unique Paths IIIhard
30Min Incompatibilityhard
31Min Flips Matrix to Zerohard
32Max Good People Statementshard
33Favorite Companies Subsetmedium
34Maximize Grid Happinesshard
35Max Groups Fresh Donutshard
36Number of Excellent Pairshard
37Max Points with Costmedium
38Number of Squareful Arrayshard
39Alice and Bob Flower Gamemedium
40Game of Nimmedium
41Make Distinct Characters Equalmedium
42Adding Spaces to Stringmedium
1Sum of Two Integers
medium
2Divide Two Integersmedium
3Find Root of N-Ary Treemedium
4Generalized Abbreviationmedium
5IP to CIDRmedium
6Range Product Queries of Powersmedium
7Min Calls to Target Arraymedium
8Min One Bit Operationshard
9Minimum Array Endmedium
10Kth Ancestor of Tree Nodehard
11The Number of Good Subsetshard
12Transform to Chessboardhard
13Shortest Path to Get All Keyshard
14Min Unique Word Abbreviationhard
15Count Complete Tree Nodeseasy
16Min Time to Visit Cell in Gridhard
17Min Time Visiting Disappearingmedium
18Find Shortest Superstringhard
19Subtree Removal Gamehard
20Max Groups Increasing Lengthhard
21Max Routes With Budgethard
22Consecutive Characterseasy
23Count Consistent Stringseasy
24Count Pairs of Similar Stringseasy
25Count Square Sum Tripleseasy
26Min Ops to Collect Elementseasy
27Two Out of Threeeasy
28Sort the Peopleeasy
29Circular Sentenceeasy
30Flipping an Imageeasy
31One-bit and Two-bit Characterseasy
32Count Max Frequencyeasy
33Complete Day Pairseasy
34Sum of Odd Length Subarrayseasy
35Majority Elementeasy
36Palindrome Permutationeasy
37Longest Nice Substringeasy
38Calculate Compressed Meaneasy
39Ways to Reach After K Stepsmedium
40Design Memory Allocatormedium