Given a positive integer N, print all integers between 1 and 2^N (or representations up to N bits) such that there are no consecutive 1s in their binary representation.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.