Skip to content
the poor coder

Home / Topics / #bit-manipulation

#Bit Manipulation

6 posts
2021

Leetcode - Power of Four Solution

Given an integer n, return true if it is a power of four. Otherwise, return false. An integer n is a power of four, if there exists an integer x such that n == 4x. Example 1: Example 2: Example 3: Constraints: -231 <= n…

2021

Leetcode - Subsets Solution

Given an integer array nums of unique elements, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order. Example 1: Example 2: Constraints: 1 <=…

ESC