Top Tweets for #BitManipulation
Day - 704
Solved a grid + bitwise XOR problem today ⚡
Explored right and down paths to find the minimum possible XOR cost from the top-left to the bottom-right cell.
#1000DaysOfCode #LeetCode #DSA #Python #BitManipulation

Day - 699
Solved a bitwise + permutation problem today ⚡
Used bitwise AND properties to determine the maximum value of K that allows a permutation to be sorted through valid swaps.
#1000DaysOfCode #LeetCode #DSA #Python #BitManipulation

Day - 688
Solved a bit manipulation + greedy problem today ⚡
Distributed set bits to maximize the values, then selected the top k elements to maximize the sum of squares.
#1000DaysOfCode #LeetCode #DSA #Python #BitManipulation

Day - 630
Solved a bit manipulation problem today ⚡
Used XOR properties to determine whether the full array has a non-zero XOR and found the maximum possible subsequence length efficiently.
#1000DaysOfCode #LeetCode #DSA #Python #BitManipulation

Day 129/365
Solved LeetCode Q1707 today.
Maximum XOR With an Element From Array.
Bitwise trie + offline queries — definitely not a straightforward one.
Learned a lot here.
#26meDSAkhatam #buildinpublic #LeetCode #bitmanipulation #trie

Day 127/365: Rebuilding Math with Bits!
• Subsets (LC 78 | Binary decision mapping)
• Divide Two Integers (LC 29 | Exponential bit-shifting) • Bitwise AND Range (LC 201 | Common prefix stripping)
• Total Hamming Distance (LC 477 | Solved by O(N) vertical bit math!)
#DSA #Java #100DaysOfCode #BitManipulation

Day 126/365: Vertical Bit-Counting & DP!
• Sum of XOR Pairs (Bitwise contribution math)
• Single Number II (LC 137 | Solved by applying modulo 3 vertical bit slicing!)
• Strange Equality (Complementary masks & powers of 2)
• Counting Bits (LC 338 | O(N) Bitwise DP)
#DSA #Java #100DaysOfCode #BitManipulation

Day 125/365: Two's Complement & Bitwise Bucketing!
• Subarray OR Sum (Bitwise contribution math)
• Single Number III (LC 260 | Solved by applying the Two-Bucket XOR pivot trick!)
• Find Two Missing Numbers (1-to-N sequence XORing)
• Min XOR Value (O(N log N) adjacency sorting trick)
#DSA #Java #100DaysOfCode #BitManipulation

Day 124/365: Greedy Bitmasking!
• Nth Magic Number (Binary-to-Base-5 mapping)
• Reverse Bits (32-bit shift mirroring)
• Help from Manny (Solved by recognizing a disguised Brian Kernighan problem!)
• Maximum AND Pair (Greedy MSB-to-LSB descent)
#DSA #Java #100DaysOfCode #BitManipulation

Day 123/365: Brian Kernighan's Algorithm!
• Count Set Bits (Solved by applying O(set_bits) n & (n-1) logic!)
• Interesting Array (Parity & XOR validation)
• Subarrays w/ Bitwise OR >= 1 (Inverse mathematical subtraction)
• Unset Bits from Right (Inverted mask loops)
#DSA #Java #100DaysOfCode #BitManipulation

Day 121/365: CPU-Level Operations & Bitmasking!
• Any Base to Decimal (Positional power scaling)
• Decimal to Any Base (Repeated division & String reversal)
• Check i-th Bit (Solved by applying an O(1) left-shift bitmask!)
• Tens Digit Sorting (Custom tie-breaking Comparator)
#DSA #Java #100DaysOfCode #BitManipulation

currently learning dynamic programming
what i learned: hashing linkedlist binarysearch slidingwindow recursion backtracking bitmanipulation(basic)
today i make dp grid question by my own but stuck in tabulation part and space optimization part
completely did memoization myself
Day 98 ✅ – Range Queries Practice
• Practiced bit manipulation + range-style enumeration
• Strengthened binary operations and bit counting logic
• Solved LED/time using brute + optimization
LeetCode: 190, 401
#100DaysOfCode #DSA #LeetCode #Java #BitManipulation #BuildInPublic

Day 97 ✅ – Huffman Coding Revision
• Revised Huffman coding + greedy compression logic
• Practiced hashmap-based encoding/decoding patterns
• Solved TinyURL design using bidirectional mapping
LeetCode: 535, 67
#100DaysOfCode #DSA #LeetCode #Java #CodingJourney #BuildInPublic

Bit Manipulation Bootcamp – From Beginner to CF 1600
We’ve launched a complete Bit Manipulation roadmap designed specifically for competitive programmers who want to move from fundamentals to a strong Codeforces level (1400–1600).
This bootcamp covers:
• Core bit manipulation concepts from scratch
• XOR patterns and problem-solving approaches
• Binary Trie and advanced applications
• 20+ carefully curated problems
• Contest-oriented explanations with implementation focus
The goal was simple: remove confusion and build clarity that actually helps in contests.
If you are serious about improving your problem-solving skills and reaching the 1400–1600 range on Codeforces, this structured roadmap will help you build that foundation.
Playlist link:
https://t.co/tkiQsEqVuP
Consistent learning. Clear concepts. Real progress.
#Codeforces #CompetitiveProgramming #DSA #BitManipulation #ProblemSolving
Day 54 of my #LeetCodeChallenge ⚡
Today’s problem:
1611. Minimum One Bit Operations to Make Integers Zero 🧠
🧩 Approach
• Recognized the pattern as Gray code transformation
• Derived recursive relation: f(n) = (2^(k+1) - 1) - f(n - 2^k)
• Used bit manipulation + recursion + memoization for efficiency
• Each recursive step mirrors lower-bit operations ⚙️
⚡ Complexity
O(log n) time | O(log n) space
✨ Takeaways
Elegant use of binary logic + recursion — shows how complex bit flips simplify beautifully through mathematical symmetry 🔁
👉 Full write-up + JS solution:
https://t.co/iBwSVcaXEr
#100DaysOfCode #LeetCode #JavaScript #BitManipulation #GrayCode #Recursion #Algorithm #CodingChallenge

Day 51/100 – Bit Manipulation ⚡
Solved today:
• Minimum Bit Flips to Convert a Number
• Single Number (I)
• XOR of Numbers in a Range
Bitwise tricks make these problems both elegant & efficient 🚀
#100DaysOfCode #DSA #BitManipulation #ProblemSolving
Day 50/100 – Halfway Milestone 🚀
Kicked off Bit Manipulation with the classic Swap problem using XOR. Excited to dive deeper into this powerful toolkit for low-level problem solving. Onwards to the next 50! 💪
#100DaysOfCode #DSA #BitManipulation #ProblemSolving #BuildInPublic
Day 50/100 – Halfway Milestone 🚀
Kicked off Bit Manipulation with the classic Swap problem using XOR. Excited to dive deeper into this powerful toolkit for low-level problem solving. Onwards to the next 50! 💪
#100DaysOfCode #DSA #BitManipulation #ProblemSolving #BuildInPublic
Day 49/100 – Doubly Linked List 🔗
Solved today:
• Delete All Occurrences of a Key in DLL
• Remove Duplicates from Sorted DLL
Pointer updates in both directions make DLL problems extra fun to debug & solve 🚀
#100DaysOfCode #DSA #BuildInPublic #ProblemSolving #LinkedList
📅Today's LeetCode Random:"Count Number of Maximum Bitwise-OR Subsets"(Medium)
👨💻Approach:
-> Computed maximum OR of all elements
-> Used backtracking to explore all subsets
-> Counted subsets whose OR equals the maximum
💡Lesson: Backtracking + pruning with max OR lets you efficiently count all valid subsets.
#LeetCode #100DaysOfCode #Backtracking #BitManipulation

🚀 Continuing my LeetCode Challenge
📅 Day 79: Power of Four
🧠 Use a bitwise check, verify that n has only 1 bit set and this bit is at an even position. A concise O(1) solution!
🔗 Link Below
#LeetCode #100DaysOfCode #BitManipulation #Math

🚀 Continuing my LeetCode Challenge
📅 Day 73: Power of Two
🧠 Never take Bit manipulation lightly, especially when it comes to powers of 2. The binary form in powers of 2 has exactly one 1, so n & (n-1) becomes 0.
🔗 Link ⤵️
#LeetCode #100DaysOfCode #BitManipulation

🚀 Continuing my Leetcode Challenge
📅 Day 64: Bitwise ORs of Subarrays
🧠 Maintain a rolling set of OR values for each subarray ending at current index. Hard to come up with the approach quickly
🔗Link⤵️
#LeetCode #100DaysOfCode #DSA #BitManipulation

P2419:🎯
Longest Subarray With Maximum Bitwise AND
You're given an array nums.
Find the length of the longest subarray that has the max bitwise AND possible.
🧠Approach:
1.) Bitwise AND decreases or stays the same, then never increases.
2.) Max AND only comes from subarrays of elements equal to max(nums).
3.) So I just found the longest consecutive streak of maxVal.
💡currLen = (num == maxVal) ? ++currLen : 0;
🕰️Time: O(n)
📦Space: O(1)
☘️Pattern: Sliding Window + Observation
Another win powered by @striver_79 & @lovebabbar3.
#LeetCode #BitManipulation #CPP #DSA #CodeHelp #BuildInPublic #takeuforward

📅 Day 62: Smallest Subarrays With Maximum Bitwise OR
🧠 Track the last seen position of each bit (0-31) from right to left. Efficient bit-tracking with a clever reverse sweep!
🔗 link⤵️
#LeetCode #100DaysOfCode #DSA #BitManipulation

P2411:🎯
Smallest Subarrays With Maximum Bitwise OR
You're given an array nums.
For each index, find the smallest subarray starting at that index with max possible OR till the end.
🧠Approach:
1.) Traversed from the back.
2.) Tracked last index of each bit using last[32].
3.) For each index i, computed farthest index where OR can reach max using these last seen bits.
4.) Subarray length = maxIdx - i + 1.
⏱️Time: O(n * 32)
💾Space: O(32)
🧩Pattern: Bitmask + Greedy from end
Another win powered by @striver_79 and @lovebabbar3.
#LeetCode #BitManipulation #DSA #CodeHelp #BuildInPublic #CPP #takeuforward
![axabhishek_0309's tweet photo. P2411:🎯
Smallest Subarrays With Maximum Bitwise OR
You're given an array nums.
For each index, find the smallest subarray starting at that index with max possible OR till the end.
🧠Approach:
1.) Traversed from the back.
2.) Tracked last index of each bit using last[32].
3.) For each index i, computed farthest index where OR can reach max using these last seen bits.
4.) Subarray length = maxIdx - i + 1.
⏱️Time: O(n * 32)
💾Space: O(32)
🧩Pattern: Bitmask + Greedy from end
Another win powered by @striver_79 and @lovebabbar3.
#LeetCode #BitManipulation #DSA #CodeHelp #BuildInPublic #CPP #takeuforward](https://pbs.twimg.com/media/GxC4smIW0AA5Gdt.jpg)
P2044:🎯
Count Max Bitwise-OR Subsets
You're given an array nums.
Count how many non-empty subsets have maximum possible OR.
🧠Approach:
1.) First computed the max OR over entire array.
2.) Ran DFS on all subsets.
3.) For each subset, if its OR equals maxOr, added to count.
🕒Time: O(2ⁿ)
💾Space: O(n)
🧩Pattern: Bitmask + Subset DFS
Another win powered by @striver_79 and @lovebabbar3.
#LeetCode #DSA #BitManipulation #CPP #BuildInPublic #CodeHelp #DFS #Backtracking #takeuforward

✨ Solved another fun one!
Problem: Count the number of subsets with the maximum bitwise OR value.
Language: C++
Status: ✅ Accepted
Always satisfying to see recursion and bitwise ops working together!
On to the next one 🚀
#Coding #LeetCode #CPlusPlus #BitManipulation

P3191:🎯
Minimum Operations to Make Binary Array = All 1s
Given a binary array, flip any 3 consecutive bits to toggle them.
Goal: Make all elements 1.
🧠Approach:
1.) Sliding greedy approach with flip toggling.
3.) Used a diff array like trick to track flips.
3.) If last 2 bits can't be fixed, return -1.
⏱️Time: O(n)
📦Space: O(n)
Another day of thanking @striver_79 and @lovebabbar3.
#Leetcode #Greedy #BitManipulation #BuildInPublic #CPP #CodeHelp #DSA #takeuforward

#DailyUpdate | July 8th
🔁 Continued solving more problems on Bit Manipulation
#DSA #BitManipulation #Coding

Most Popular Users

Elon Musk 
@elonmusk
240M followers

Barack Obama 
@barackobama
118.6M followers

Cristiano Ronaldo 
@cristiano
114.4M followers

Donald J. Trump 
@realdonaldtrump
111.7M followers

Narendra Modi 
@narendramodi
106.9M followers

Rihanna 
@rihanna
98.6M followers

NASA 
@nasa
92.1M followers

Justin Bieber 
@justinbieber
91.7M followers

KATY PERRY 
@katyperry
89.9M followers

Taylor Swift 
@taylorswift13
83.9M followers

Lady Gaga 
@ladygaga
75.4M followers

Virat Kohli 
@imvkohli
73.3M followers

Kim Kardashian 
@kimkardashian
70.8M followers

YouTube 
@youtube
68.6M followers

Neymar Jr 
@neymarjr
66.3M followers

Bill Gates 
@billgates
65.2M followers

Selena Gomez 
@selenagomez
63M followers

The Ellen Show
@theellenshow
62.1M followers

CNN 
@cnn
61.7M followers

X 
@x
60.6M followers






































