# LeetCode 1720. Decode XORed Array

Description https://leetcode.com/problems/decode-xored-array/ There is a hidden integer array arr that consists of n non-negative integers. It was encoded into another integer array encoded of length n – 1, such…

# LeetCode 1018. Binary Prefix Divisible By 5

Description https://leetcode.com/problems/binary-prefix-divisible-by-5/ Given an array A of 0s and 1s, consider N_i: the i-th subarray from A to A[i] interpreted as a binary number (from most-significant-bit to least-significant-bit.) Return a…

# LeetCode 67. Add Binary

Description https://leetcode.com/problems/add-binary/ Given two binary strings a and b, return their sum as a binary string. Example 1: Input: a = “11”, b =…

# LeetCode 1356. Sort Integers by The Number of 1 Bits

Description https://leetcode.com/problems/sort-integers-by-the-number-of-1-bits/ Given an integer array arr. You have to sort the integers in the array in ascending order by the number…

# LeetCode 868. Binary Gap

Description https://leetcode.com/problems/binary-gap/ Given a positive integer n, find and return the longest distance between any two adjacent 1‘s in the binary representation of n. If there are…

# LeetCode 1009. Complement of Base 10 Integer

Description https://leetcode.com/problems/complement-of-base-10-integer/ Every non-negative integer N has a binary representation.  For example, 5 can be represented as “101” in binary, 11 as “1011” in binary, and so on.  Note that…

# LeetCode 476. Number Complement

Description https://leetcode.com/problems/number-complement/ Given a positive integer num, output its complement number. The complement strategy is to flip the bits of its binary representation.…

# LeetCode 1486. XOR Operation in an Array

Description https://leetcode.com/problems/xor-operation-in-an-array/ Given an integer n and an integer start. Define an array nums where nums[i] = start + 2*i (0-indexed) and n == nums.length. Return the bitwise XOR of…

# LeetCode 201. Bitwise AND of Numbers Range

Description https://leetcode.com/problems/bitwise-and-of-numbers-range/ Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of…

# LeetCode 190. Reverse Bits

Description https://leetcode.com/problems/reverse-bits/ Reverse bits of a given 32 bits unsigned integer. Example 1: Input: 00000010100101000001111010011100 Output: 00111001011110000010100101000000 Explanation: The input…