0

There is an infinite sequence b, such that b[i] = 1 , if the binary representation of i has odd number of 1s, and b[i] = 0 , otherwise. Given a sub sequence of 0s and 1s, I am required to find the starting index of a match, if one exists or state that a match doesn't exist if it doesn't. What is an efficient way to do it?

user3760100
  • 679
  • 1
  • 9
  • 20

0 Answers0