Binary Number with Alternating Bits
Given a positive integer N, return whether or not it has alternating bit values.
Given a positive integer N, return whether or not it has alternating bit values.
This question is asked by Facebook. Given two integers x and y, return the hamming distance between the two numbers.
Given an array of words, return the length of the longest phrase, containing only unique characters, that you can form by combining the given words together.
This question is asked by Amazon. Given an array that contains all distinct values from zero through N except one number, return the number that is missing from the array.