title: Finding consecutive bit string of 1 or 0
body: <p>How to find the length of the longest consecutive bit string(either 1 or 0)?</p>
  
  <p>00000000 11110000 00000000 00000000  -> If it is 0 then length will be  20</p>
  
  <p>11111111 11110000 11110111 11111111 -> If it is 1 then length will be  12</p>