title: Need help with pseudocode please
body: <p>Given a binary number calculate the maximum block.
  For ex:
  Binary representation = 11111
  Maximum block length = 5</p>
  
  <p>Binary representation = 10111011
  Maximum block length = 3</p>
  
  <p>max block means the number of consecutive 1's or 0's. So 00010000 would have a max block of 4</p>
  
  <p>Above are the only 2 examples my professor gave.
  "Compute the maximum block length of the binary
  representation." This is what he said. I'm assuming this includes 0s as well. I really don't know how to go about it.</p>
  
  <p>This is what I have come up with:</p>
  
  <p>Let B = the binary number received.
  put B into A[], each digit representing an element.
  assume A[0] = 1
  for A.length - 1
  count 1s as long as not hit zero
  max = total count of 1s.
  count 0s as long as not hit 1
  update max if necessary
  repeat.</p>