Given two integers dividend and divisor, divide dividend by divisor without using multiplication, division, or modulus operators. Truncate the result towards zero and return the quotient.
You are given an integer array nums containing unique elements. Find all possible subsets (the power set) of the array nums. The solution set should not contain duplicate subsets, and the result can be returned in any order.
Given an integer n, generate an n-bit Gray code sequence. A Gray code sequence is a sequence of integers where each integer’s binary representation differs from the next one by exactly one bit. The first integer in the sequence is always 0, and every integer appears only once in the sequence. The binary representation of the first and last integers should also differ by exactly one bit.
Given an integer array nums that may contain duplicates, return all possible subsets (the power set) of the array. The solution set should not contain duplicate subsets. The subsets should be returned in any order.
Given a non-empty array of integers where every element appears twice except for one element that appears once, find the single element that appears only once. The solution must have linear time complexity and use only constant space.