Tag: bit-manipulation
- Add Binary
- Android Unlock Patterns
- Apply Bitwise Operations to Make Strings Equal
- Apply Operations on Array to Maximize Sum of Squares
- Beautiful Arrangement
- Binary Gap
- Binary Number with Alternating Bits
- Binary Prefix Divisible By 5
- Binary Watch
- Bitwise AND of Numbers Range
- Bitwise OR of Adjacent Elements
- Bitwise OR of All Subsequence Sums
- Bitwise ORs of Subarrays
- Bitwise XOR of All Pairings
- Bulb Switcher II
- Campus Bikes II
- Can I Win
- Can Make Palindrome from Substring
- Chalkboard XOR Game
- Check If a String Contains All Binary Codes of Size K
- Check if Bitwise OR Has Trailing Zeros
- Cinema Seat Allocation
- Circular Permutation in Binary Representation
- Closest Subsequence Sum
- Complement of Base 10 Integer
- Concatenation of Consecutive Binary Numbers
- Construct the Minimum Bitwise Array I
- Construct the Minimum Bitwise Array II
- Convert a Number to Hexadecimal
- Count Complete Tree Nodes
- Count Number of Maximum Bitwise-OR Subsets
- Count Pairs of Points With Distance k
- Count Pairs Of Similar Strings
- Count Pairs With XOR in a Range
- Count Paths That Can Form a Palindrome in a Tree
- Count Paths With the Given XOR Value
- Count Subtrees With Max Distance Between Cities
- Count the Number of Beautiful Subarrays
- Count the Number of Consistent Strings
- Count the Number of Square-Free Subsets
- Count Triplets That Can Form Two Arrays of Equal XOR
- Count Triplets with Even XOR Set Bits I
- Count Triplets with Even XOR Set Bits II
- Count Words Obtained After Adding a Letter
- Counting Bits
- Decode XORed Array
- Decode XORed Permutation
- Distribute Repeating Integers
- Divide Array Into Equal Pairs
- Divide Two Integers
- Encode Number
- Fair Distribution of Cookies
- Find a Good Subset of the Matrix
- Find a Value of a Mysterious Function Closest to Target
- Find if Array Can Be Sorted
- Find Kth Largest XOR Coordinate Value
- Find Longest Awesome Substring
- Find Minimum Time to Finish All Jobs
- Find Number of Ways to Reach the K-th Stair
- Find Products of Elements of Big Array
- Find Root of N-Ary Tree
- Find Subarray With Bitwise OR Closest to K
- Find the Difference
- Find the Duplicate Number
- Find the K-or of an Array
- Find the K-th Character in String Game I
- Find the K-th Character in String Game II
- Find The K-th Lucky Number
- Find the Longest Substring Containing Vowels in Even Counts
- Find the Maximum Sequence Value of Array
- Find the Maximum Sum of Node Values
- Find the Minimum Cost Array Permutation
- Find The Original Array of Prefix Xor
- Find the Prefix Common Array of Two Arrays
- Find the Shortest Superstring
- Find the XOR of Numbers Which Appear Twice
- Find Xor-Beauty of Array
- Find XOR Sum of All Pairs Bitwise AND
- First Letter to Appear Twice
- Flipping an Image
- Frequencies of Shortest Supersequences
- Game of Nim
- Generalized Abbreviation
- Generate Binary Strings Without Adjacent Zeros
- Gray Code
- Groups of Strings
- Guess the Number Using Bitwise Questions I
- Guess the Number Using Bitwise Questions II
- Hamming Distance
- Integer Replacement
- IP to CIDR
- K-th Symbol in Grammar
- Kth Smallest Amount With Single Denomination Combination
- Largest Combination With Bitwise AND Greater Than Zero
- Letter Case Permutation
- Longest Nice Subarray
- Longest Nice Substring
- Longest Subarray With Maximum Bitwise AND
- Make the XOR of All Segments Equal to Zero
- Matchsticks to Square
- Maximize Grid Happiness
- Maximize Score After N Operations
- Maximize the Number of Partitions After Operations
- Maximize Value of Function in a Ball Passing Game
- Maximum AND Sum of Array
- Maximum Compatibility Score Sum
- Maximum Cost of Trip With K Highways
- Maximum Genetic Difference Query
- Maximum Good People Based on Statements
- Maximum Hamming Distances
- Maximum Length of a Concatenated String with Unique Characters
- Maximum Number of Achievable Transfer Requests
- Maximum Number of Groups Getting Fresh Donuts
- Maximum Number of Moves to Kill All Pawns
- Maximum Number That Sum of the Prices Is Less Than or Equal to K
- Maximum OR
- Maximum Points After Collecting Coins From All Nodes
- Maximum Points in an Archery Competition
- Maximum Possible Number by Binary Concatenation
- Maximum Product of the Length of Two Palindromic Subsequences
- Maximum Product of Word Lengths
- Maximum Rows Covered by Columns
- Maximum Score Words Formed by Letters
- Maximum Sized Array
- Maximum Strength of a Group
- Maximum Strong Pair XOR I
- Maximum Strong Pair XOR II
- Maximum Students Taking Exam
- Maximum Total Reward Using Operations II
- Maximum XOR After Operations
- Maximum XOR for Each Query
- Maximum XOR of Two Numbers in an Array
- Maximum Xor Product
- Maximum XOR With an Element From Array
- Minimize OR of Remaining Elements Using Operations
- Minimize XOR
- Minimum Array End
- Minimum Bit Flips to Convert Number
- Minimum Cost to Connect Two Groups of Points
- Minimum Cost Walk in Weighted Graph
- Minimum Flips to Make a OR b Equal to c
- Minimum Impossible OR
- Minimum Incompatibility
- Minimum Increments for Target Multiples in an Array
- Minimum Number of Flips to Convert Binary Matrix to Zero Matrix
- Minimum Number of K Consecutive Bit Flips
- Minimum Number of Lines to Cover Points
- Minimum Number of Operations to Make Array XOR Equal to K
- Minimum Number of Work Sessions to Finish the Tasks
- Minimum Numbers of Function Calls to Make Target Array
- Minimum One Bit Operations to Make Integers Zero
- Minimum Operations to Collect Elements
- Minimum Operations to Form Subsequence With Target Sum
- Minimum Operations to Make Array Elements Zero
- Minimum Operations to Make Binary Array Elements Equal to One I
- Minimum Operations to Make the Integer Zero
- Minimum Operations to Reduce an Integer to 0
- Minimum Score After Removals on a Tree
- Minimum Sum of Values by Dividing Array
- Minimum Time to Break Locks I
- Minimum Time to Kill All Monsters
- Minimum Unique Word Abbreviation
- Minimum XOR Sum of Two Arrays
- Missing Number
- Naming a Company
- Neighboring Bitwise XOR
- Non-decreasing Subsequences
- Number Complement
- Number of 1 Bits
- Number of Bit Changes to Make Two Integers Equal
- Number of Even and Odd Bits
- Number of Excellent Pairs
- Number of Good Ways to Split a String
- Number of Possible Sets of Closing Branches
- Number of Self-Divisible Permutations
- Number of Squareful Arrays
- Number of Steps to Reduce a Number in Binary Representation to One
- Number of Steps to Reduce a Number to Zero
- Number of Subarrays With AND Value of K
- Number of Valid Words for Each Puzzle
- Number of Ways to Build Sturdy Brick Wall
- Number of Ways to Wear Different Hats to Each Other
- Number of Wonderful Substrings
- Optimal Account Balancing
- Palindrome Permutation
- Parallel Courses II
- Partition Array Into Two Arrays to Minimize Sum Difference
- Partition to K Equal Sum Subsets
- Power of Four
- Power of Two
- Prime Number of Set Bits in Binary Representation
- Prison Cells After N Days
- Pseudo-Palindromic Paths in a Binary Tree
- Pyramid Transition Matrix
- Range Product Queries of Powers
- Remove All Ones With Row and Column Flips II
- Remove All Ones With Row and Column Flips
- Repeated DNA Sequences
- Reverse Bits
- Score After Flipping Matrix
- Select Cells in Grid With Maximum Score
- Set Mismatch
- Shopping Offers
- Shortest Path to Get All Keys
- Shortest Path Visiting All Nodes
- Shortest Subarray With OR at Least K I
- Shortest Subarray With OR at Least K II
- Single Number II
- Single Number III
- Single Number
- Smallest Number With All Set Bits
- Smallest Subarrays With Maximum Bitwise OR
- Smallest Sufficient Team
- Sort Integers by The Number of 1 Bits
- Special Permutations
- Split Array Into Maximum Number of Subarrays
- Split Array With Same Average
- Stickers to Spell Word
- Subsets II
- Subsets
- Substring XOR Queries
- Sum of All Subset XOR Totals
- Sum of Two Integers
- Sum of Values at Indices With K Set Bits
- The Number of Good Subsets
- Total Hamming Distance
- Transform to Chessboard
- Triples with Bitwise AND Equal To Zero
- Two Out of Three
- Unique Length-3 Palindromic Subsequences
- Unique Paths III
- UTF-8 Validation
- XOR Operation in an Array
- XOR Queries of a Subarray