Opening your learning path
Progress is saved as you study.
Opening your learning path
Progress is saved as you study.
The Bit Manipulation Patterns pattern applies when you need xOR tricks, counting bits, power-of-two checks, and Hamming weight. Its time complexity is O(n) and space complexity O(1). It is used in 13 problems on Thita, including Bitwise AND of Numbers Range, Counting Bits and Find the Difference. Common variations are Bitwise Operations - Power of Two/Four Check and Bitwise XOR - Finding Single/Missing Number.
Master bit manipulation including XOR tricks, counting bits, power of two checks, and bit masking. Essential for optimization and low-level problems.
Bit Manipulation Patterns is pattern 14 of 16 in the Thita.ai DSA course. It covers xOR tricks, counting bits, power-of-two checks, and Hamming weight, split into 4 subpatterns and about 1.5 hours of study. It is a depth pattern: reach for it once the interview-critical patterns are solid.
Each subpattern below has its own theory page and problem set. They are listed in the order the course teaches them.
Read the theory for a subpattern, then solve its problems in the browser editor. Your solution runs against the problem's test cases, and the AI coach gives a hint on the technique you are missing rather than the finished answer. Progress is tracked per subpattern, so the tracker shows which of the 4 Bit Manipulation Patterns subpatterns you have covered. Topics covered here include bit manipulation, bitwise operations, XOR tricks, counting bits, power of two, bit masking, binary operations, leetcode bit manipulation.
13 problems, easiest first.
Fetching theory for Bitwise Operations - Power of Two/Four Check...